Eric Lippert in Fabulous Adventures in Coding:
No one I know at Microsoft asks those godawful “lateral-thinking puzzle” interview questions anymore. Maybe someone still does, I don't know. But rumour has it that a lot of companies are still following the Microsoft lead from the 1990s in their interviews. In that tradition, I present a sequel to Keith Michaels' 2003 exercise in counterfactual reasoning. Once more, we dare to ask the question “how well would the late Nobel-Prize-winning physicist Dr. Richard P. Feynman do in a technical interview at a software company?“
Interviewer: Now we come to the part of the interview where we test your creative thinking. Don't think too hard about it; just apply common sense and explain your reasoning. Here's the problem.
You are in a room with three switches that each control a different light fixture in another room. You cannot see from the switch room into the lamp room. Your task is to determine which switches control which light fixtures, but you may only go into the room with the lights once. How do you determine which switch controls which light?
RPF: That seems straightforward. I could obtain a number of large mirrors, and, if necessary, a telescope. I enter the room with the lights once and position the mirror so that it reflects all three lights out the door of the room. I continue placing mirrors, aligning them as necessary to reflect the photons emitted by the lights until I am back in the room with the switches. Now I can see the lights, possibly through the telescope if the distance is large, and I can toggle the switches on and off so as to determine which light is controlled by which switch.