One question to find the good door from two guards
Question
You stand before two doors: behind one is a job offer, behind the other nothing. Each door has a guard; one guard always tells the truth and the other always lies, but you do not know which is which. You may ask a single question to just one of the guards. What question lets you pick the right door?
Short answer
Ask either guard: "Which door would the other guard say leads to the offer?" and then choose the opposite door. The answer passes through exactly one liar whichever guard you ask, so it always points to the bad door.
Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 2.3 Thinking Out of the Box, 'Door to offer', p.11; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solution