Hell or Heaven — Puzzle for Interview rounds

Placewit
2 min readAug 21, 2021

Question :

You are standing before two doors. One of the path leads to heaven and the other one leads to hell. There are two guardians, one by each door. You know one of them always tells the truth and the other always lies, but you don’t know who is the honest one and who is the liar.

You can only ask one question to one of them in order to find the way to heaven. What is the question?

Solution :

The question you need to ask is -

“If I ask the other guard which is the door to heaven, which door will he point me to?”

No matter who you ask this question to, that guard will always point you to the door to hell. So we can now easily find out who told a lie. Let’s see how…

Let us assume that the left door leads to heaven.

If you ask the guard which speaks truth about which path leads to heaven, as he speaks always the truth, he would say “left”.

Now that the liar, when he is asked what “the other guard (truth teller)” would answer, he would definitely say “right”.

Similarly, if you ask the liar about which path leads to heaven, he would say “right”.

As the truth teller speaks nothing but the truth, he would say “right” when he is asked what “the other guard (liar)” would answer.

So in any case, you would end up having the path to hell as an answer. So you can chose the other path as a way to heaven.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--