Selecting the Correct Door with One Question
Choosing the Right Door Puzzle is a medium quant interview question on Brain Teasers.
This brain teaser describes a classic two-guard, two-door puzzle framed around choosing the door that leads to a job offer instead of an unwanted outcome. You know one guard always tells the truth and the other always lies, but you do not know which is which, and you are allowed exactly one yes-or-no question to a single guard. The challenge is to design a question such that, regardless of whom you ask, the answer reliably guides you to the correct door. Variants of this style of logic puzzle often appear in interviews for roles that prize structured thinking and careful handling of incomplete or adversarial information.
Solving it leans on formal reasoning about logical negation, conditionals, and symmetry: you must treat "truth-teller" and "liar" as two predictable but unknown functions transforming reality into answers. The key technique is constructing a self-referential or "nested" question whose truth value is invariant under swapping these roles. Interviewers look for candidates who can abstract away from the story, systematically enumerate possibilities, and engineer a question that collapses all cases into one interpretable response without trial-and-error guessing.
What it tests
This class of problems is governed by the principle of information invariance under uncertainty about truthfulness. When faced with agents whose statements are systematically opposed (one always tells the truth, one always lies), you can construct questions whose answers are invariant to which agent you ask by nesting their behaviors: asking about what the other would say. This double-negation or 'mirror' structure ensures that the answer you receive encodes the truth, regardless of the responder's nature. The underlying reason is that both the truth-teller and the liar, when asked about the other's answer, will invert the truth in a predictable way, allowing you to decode the real state from their response. This technique generalizes to any scenario where you must extract reliable information from sources with opposing truth behaviors and unknown identities.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free