One guard, unknown honesty, one question
Asked at Optiver, IMC
Two doors face you: the left leads to freedom, the right to a dungeon (or the other way around, you don't know). A single guard stands between them. He is either a knight, who always tells the truth, or a knave, who always lies, and you have no idea which one he is.
You may ask him exactly one yes/no question.
What one question guarantees you learn which door leads to freedom?
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.