Puzzle – Which Door to Select
You are standing in front of two doors. One leads to a room with a pot of gold, and the other leads to a room with a hungry lion that hasn’t eaten in days. There are two men standing beside the doors. One of them always tells the truth, and the other always lies. You don’t know which is which. You can ask only one question to one of the men to determine which door leads to the pot of gold. What question should you ask?
Puzzle | Which Door to Select
You should ask one of the men, “If I were to ask the other man which door leads to the pot of gold, what would he say?” No matter which man you ask, he will have to point to the same door.
If you ask the truth-teller, he will truthfully answer that the liar would point to the door that leads to the hungry lion. If you ask the liar, he will lie and say that the truth-teller would also point to the door that leads to the hungry lion. So no matter who you ask, you should choose the opposite door that they point to.
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!