Jr Interview Questions

86,538 jr interview questions shared by candidates

There are 100 prisoners on an island. Starring from Day 1, a guard will play the following game with them. On the n th day, a random prisoner will be brought into a room, which contains a switch that is either on or off. After he left the room, the guard will then ask the prisoner if everybody has been to the room. He can answer either "Yes" or "I dun know". If he answered "yes" and he is correct, everyone is free' otherwise everyone dies. If he answered "I dun know", the game continues: a prisoner will be choosen at random on (n+1)-th day and so on. Now these 100 prisoners are free to meet and discuss a strategy on the night of 0th day. Afterwards they will not be able to see anyone else at all. No other communcation is possible except the binary switch in the room. Is there a sure-fire strategy to free all of them?
avatar

Junior Proprietary Trading Intern

Interviewed at D. E. Shaw & Co. - Investment Firm

3.8
Feb 24, 2013

There are 100 prisoners on an island. Starring from Day 1, a guard will play the following game with them. On the n th day, a random prisoner will be brought into a room, which contains a switch that is either on or off. After he left the room, the guard will then ask the prisoner if everybody has been to the room. He can answer either "Yes" or "I dun know". If he answered "yes" and he is correct, everyone is free' otherwise everyone dies. If he answered "I dun know", the game continues: a prisoner will be choosen at random on (n+1)-th day and so on. Now these 100 prisoners are free to meet and discuss a strategy on the night of 0th day. Afterwards they will not be able to see anyone else at all. No other communcation is possible except the binary switch in the room. Is there a sure-fire strategy to free all of them?

Viewing 71 - 80 interview questions

Glassdoor has 86,538 interview questions and reports from Jr interviews. Prepare for your interview. Get hired. Love your job.