Post:
You have three switches in one room and a single light bulb in another room. You are allowed to visit the room with the light bulb only once. How do you figure out which switch controls the bulb? Write your answer in the comments before looking at other answers.
Comment:
If this were an interview question, the correct response would be "Do you have any relevant questions for me? Because have a long list of things that more deserving of my precious time than to think about this!
- Use the heat of the bulb to determine if it was on. (Shows you can memorize stupid interview questions)
- Ask a team member to coordinate with you in the other room. (You’re a team player)
- Use a cable locator (Proper tool for the trade)
- Put your phone in the other room, stream camera feed to your work laptop (The tech approach)
- Unscrew the bulb. Now you know that no switch controls the bulb (Exposing the flaw in the task’s phrasing)
- Open switch panel and disconnect one switch. Wait a day. If no one complains, disconnect the second. Wait a day. If no one complains, it’s probably the third. For good measure, disconnect the third switch. If still no one complains, remove all switches and the lightbulb, since they’re not needed anymore. (The Sysadmin approach)
I am the sysadmin and I approve this message.
I think if its LED then the heat of the bulb strategy won’t work.
Give it few minutes, they get warm as well.
Open switch panel and disconnect one switch. Wait a day. If no one complains, disconnect the second. Wait a day. If no one complains, it’s probably the third. For good measure, disconnect the third switch. If still no one complains, remove all switches and the lightbulb, since they’re not needed anymore. (The Sysadmin approach)
I used this method a few months ago in my breaker box. I needed to make room in it for an EV charger.
So, how’s the freezer doing by now?
I’m about to throw up.
What about trying to figure out first what the other two buttons do? Maybe they turn on the light of the room you’re in. And I can see light without entering a room right? Just open the door, no need to enter it. If not allowed, look at the foot of the door or try to see if the room has a window.
No need to buy fancy equipment or even go into the room at all.
You’re assuming they don’t control something in the room with the light, or they could control the lights in your room and the light you’re trying to check .
Ah yes.
The infamous “they” who control everything.
But what “they” who control “they”, who are really in control of the lights in your room and the lights you’re trying to check?
What if there’s an infinite amount of “theys” all the way down that by mathematical logic leads to myself?
What if the interview being held and the question being asked wasn’t meant to test me, but to test you?
What then?By “they”, I meant the switches.
But I’m just a brain in a jar and you are a simulation implanted in my consciousness by the switches so it doesn’t really matter.
You’re screwed, the bulb is now LED and puts off no heat.
Led bulbs become warm after a few minutes. Not hot, but warm enough to identify if it’s been running.
Replace the Lightbulb with a paperclip then flip the switches until you hear the circuitbreaker trip
All three switches are on the same circuit.
The answer is to turn on the first one and wait ten minutes. Then turn it off and flick on the second switch and go and look at the light. If the light is off and the bulb is hot it is the first switch if its off and cold its the third switch and if its on its the second switch.
Hope this helps.
that assumes one of the three switches is able to turn the light on, which is not stated in the question
“Do you have any questions for us?”
“You have three engineers in one room. The order comes to let one go. Who do you let go and why?”
“Wut?”
The one that came up with the light bulb question. And if they have to ask why, they should go too.
It’s funny to read the reactions and the people not understanding that programming questions are not enough to judge you. We need people with functioning brains and that usually means problem solving skills. And sometimes the problems are fucking idiotic! Nobody cares about the light switches. We want to see how you think. We want people who don’t give up if they can’t look it up.
You think you’re hot shit because you learnt the latest trendy language? I’ve wasted entire days with people like that because they couldn’t be fucking arsed reading error messages and figuring things out by themselves.
I’ve wasted entire days with people like that because they couldn’t be fucking arsed reading error messages and figuring things out by themselves.
Everyone has those days. People are not a static value.
Which is why companies here don’t do stupid tests but look if you fulfill some absolute minimum requirements and then look how you do with the team and the job for a week.
That’s a much better question, though! “Here’s a stack trace and the source code. Walk me through where to go from here.”
Most places use at least some open source software, so most places can do this, and if you ask your sys admin team nicely, there’s probably some stack traces available, hot off the prod.
Sure, but I’ve a guy working with me who’s supposed to have ten years xp in the tech we use, and he’s pretty fucking useless.
Meanwhile the young front-end dev who didn’t know any of our tech turns out to learn everything we throw at her after one explanation. Pure tech eval would’ve meant throwing her away after reading her cv.
Stupid interview questions show you nothing about how people think. Might as well ask them their astrological animal and blood type
On the contrary, someone can learn a lot from a question like this. If they immediately spit out the answer, then I know that they studied and came prepared to answer common questions like that. If they give a response like the OP, then I know they are an asshole to work with. If they don’t know, do they ask follow up questions or ask for a moment to think can tell me how well they like to work in a group. If they talk about asking a coworker vs researching a solution independently first can tell me how they may react to a brick wall of a problem. Last thing that comes to my mind, is how long they try before giving up. That can be a good indicator for how they treat work meetings - do they push through the task one at a time and in exact order, or do they have the social skills to know when it is time to shut up and move on to the next thing.
The problem is that it sounds like a riddle. In a riddle, you’re traditionally supposed to work within the rules that you’ve been told. So, not thinking outside the box here is not an indication that the person isn’t capable of doing so.
Of course, if I encountered this problem in real life, I’d ask Carol from accounting to check the other room, while I flip the switches. But my instinctive answer was that it is not possible, because I assumed it to be a riddle and the provided rules did not allow a solution.
I think I was asked this very question in an interview once. I think I answered something along the lines of ‘If you have a light switch like that here in the office, the first thing I would recommend is calling in an electrician to change and move the switch to the correct room. Why would you have a light switch that controls a light in a different room and apparently two switches that do nothing??’
Got the job.
Only works if it’s an incandescent light, but…
Flip one switch. Wait a few minutes. Flip it off.
Flip the second switch and go into the room.
If the light is on, it’s the switch you flipped most recently. If the light is off but warm, it was the first switch. If it’s off and cold, it’s the switch you didn’t touch.
Only works if it’s an incandescent light
LED and fluorescent lights get hot too, it just takes a bit longer.
Yeah like few hours longer. And if I’m asked that I’ll force the interviewer to sit through until it gets warm
Go in the room, smash the lightbulb. There, now it’s none of the switches.
I think I’ll pass this interview no problem.
Edit: Damn, someone beat me to it. I posted without reading the comments as instructed.








