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?
Jr Interview Questions
86,538 jr interview questions shared by candidates
if p1 and p2 are two consecutive prime number, in which cases (p1 + p2) / 2 is a prime number.
Comment répondriez-vous à un client qui refuse d'avoir la fibre par peur des trous dans son installation ?
write a program to print the given series (user need to enter the nth series number from keyboard) 2,3,5,11,23,29,41,53,83,89 .....
can you decrease one liquid temprature fromm 100oC to 20 oC but room temprature is 25 oC
4 _?_ 4 _?_ 4 = 20 Put the proper operators to get the output.
what is your parents dream? how you are going achieve that dream?
Describe yourself in three words.
What's the probability of getting 2 tails before 3 heads?
count the number of duplicates in a binary tree in O(n) time O(1) space.
Viewing 71 - 80 interview questions