this used to be a common question to get into tech companies like Google: There are 100 lights numbered 1 to 100, all starting in the off position. There are also 100 people numbered 1 to 100. First, person 1 toggles every light switch (toggle means to change from off to on, or change from on to off). Then person 2 toggles every 2nd light switch, and so on, where person i toggles every ith light switch. The last person is person 100 who toggles every 100th switch. After all 100 people have passed, which light bulbs will be turned on?
Press space