Amazon.com Widgets

The Light Bulb Riddle

Here's a fairly easy riddle for you:

There are three light bulbs in a room, and three light switches outside the room. You are outside and want to match which switch goes with which light bulb. You can only travel into the room once, and cannot come back in again. You can do anything you want upon entering the room. How can you set the situation so that you will know which switch goes with which light bulb?
View the "extended entry" link below for the answer.  Don't be tempted to click too early.

Comments
Billservo's Gravatar I think I was asked this in my Microsoft interview. Either this one or the mixed up tennis balls in the crates one (they're both easy anyway).

I remember getting some riddle right. And I remember not getting an offer either.
# Posted By Billservo | 2/13/06 11:28 AM
Greg Bellingham's Gravatar I got this one in my interview too. It parallels a binary search. I did get an offer that time either, but I did the next time. I swear the devs just ask these to feel superior and amuse themselves. As long as you have an understanding of accepted solutions to algorithmic efficiency, you have no use for these silly puzzles in daily progamming work and I personaly think that it is wrong to judge candidates based solely upon them.
# Posted By Greg Bellingham | 8/24/07 5:02 AM
Steve's Gravatar We occasionally use riddles when we interview. Whether or not the candidate gets the riddle correct is pretty unimportant. Rather, how they react to being asked to solve a problem can be telling. Personality is very important to us when hiring. Somebody with great skills is useless to us if nobody on the team wants to work with them. Riddles allows us a peek at their true personality during the short time of the interview.
# Posted By Steve | 8/24/07 2:24 PM

Raymond Camden's BlogCFC version 5.8.001