It’s been a while.
At my interview today, I was asked a tricky brainteaser. I couldn’t find anywhere else to post it (twitter word limit fail and learned to never post anything on facebook) and I wished I had a blog that where I could post it. Then I remembered this place, so tata, here I am. :)
My interviewer started off with the most common brainteaser: what’s the angle formed by two clock hands at 3:15. I blurred out the answer as if I memorized the it, well I kind of did memorize the answer after seeing the problem so many times, but he was definitely surprised and asked me whether the previous intern told me that he would ask me this question.
Then I said (big mistake #1): “Oh no, of course not. I just love brain teasers.” And this is where I got myself into 2 pages of big messy scribbles and 10 minutes of excruciating embarrassment and pain.
Here it is:
Suppose there is a room with 100 light bulbs labelled 1 through 100. Person 1 walks in the room and turns on every light bulb. Person 2 walks in the room and flips the switch on every 2nd light bulb (i.e. he turns off all even numbered light bulbs). Person 3 walks in the room and flips the switch on every 3rd light bulb (turning some on and some off). This process continues until person 100 goes through and flips the switch on the 100th light bulb. Which light bulbs will be lit up at the end?
(I got the answer in the end after he dropped me this hint: what’s so special about odd numbers?)
Have fun with the problem folks. :)