Senior software developer interview questions shared by candidates
Another was a puzzle: A king orders 100 bottles of wine for a celebration. A courtier who's angry with the king over something puts poison in one of those bottles. The king has a way of identifying the poisoned bottle by giving a few drops of wine to a monkey. Since the poison is fast acting, the monkey will die immediately. Whats the minimum number of monkeys needed to find the poisoned bottle?
Assuming that there is only one poisoned bottle, then you only need one monkey- because as soon as it dies, you found the bottle. However, if there is more than one bottle, or suspicion of more than one bottle, you will need at least two monkeys.
you need only one monkey since you will keep giving him wine till he dies and as soon as he's dead you know that was the bottle.
I think it means we can only test once. So the minimum # of monkeys is 99, is it?
See Interview Questions for Similar Jobs
- Software Engineer
- Senior Software Engineer
- Software Developer
- Software Development Engineer
- Senior Software Development Engineer
- Java Developer
- Senior Developer
- Principal Software Engineer
- Vice President
- Senior Java Developer
- Software Development Engineer II
- Project Manager
- Software Engineer II
- Staff Software Engineer
- Software Engineer III