ZS Associates Interview Question

Puzzle- bulb inside room and switch outside