Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Lightbulb Switch Mapping

MediumCoding00:00
Practice interviewer
In session
5 left
00:00

Your question is Lightbulb Switch Mapping. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

You are outside a room with 3 lightbulbs, that are turned on, labeled 1,2,3. Outside the room there are 3 buttons that correspond to the lightbulbs inside. You can press the switches in any order without looking inside to turn light bulbs off. You can then go inside the room to determine which light corresponds to each light. How can you determine which light corresponds to what switch?