At face value, it appears that these two stories are very different: one is about a man stranded at sea with only a tiger for company, while the other is about a Danish prince and his efforts to avenge his father's murder.
I would argue that there are three factors which make these stories similar. The first is the utter loneliness experienced by the protagonist, the second is the presence of a quest, and the third is the presence of unnatural or supernatural elements.
There can be no doubt that Pi is desperately lonely during the 227 days that he is marooned at sea. With only a tiger for company, there is no conversation to be had, and no one with whom to commiserate about the hunger, thirst, and heat that he is enduring. In the case of Hamlet, he seems to be the only one who hasn't immediately gotten over his father's death. His mother is about to remarry, and life seems to have moved on for everyone but Hamlet.
Secondly, each man is on a quest of some kind. Pi, although he is powerless...
(The entire section contains 4 answers and 925 words.)