We've been publishing some of Google's old (now banned) interview questions this week.
The first set: 15 Google Interview Questions That Made Geniuses Feel Dumb
The second set: 15 MORE Google Interview Questions That Made Geniuses Feel Dumb
Here are the answers to the second set.
Every man in a village of 100 married couples has cheated on his wife…
Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?
Answer, from reader Olivier Coudert:
The cheating husband problem is a classic recursion pb.
Once all the wives know there are at least 1 cheating husband, we can understand the process recursively. Let's assume that there is only 1 cheating husband. Then his wife doesn't see anybody cheating, so she knows he cheats, and she will kill him that very day. If there are 2 cheating husband, their wives know of one cheating husband, and must wait one day before concluding that their own husbands cheat (since no husband got killed the day of the announcement).
So with 100 cheating husbands, all life is good until 99 days later, when the 100 wives wives kill their unfaithful husband all on the same day.
Job: Product Manager
Photo: symmetry_mind
If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)?
Reader ru offers this answer:
The trick here is that .95 is the probability for 1 or more cars, not the probability of seeing just one car.
The prob. of NO cars in 30 minutes is 0.05, so the prob of no cars in 10 minutes is the cube root of that, so the prob of seeing a car in 10 minutes is one minus *that*, or ~63%
Job: Product Manager
Four people need to cross a rickety rope bridge to get back to their camp at night…
Unfortunately, they only have one flashlight and it only has enough light left for seventeen minutes. The bridge is too dangerous to cross without a flashlight, and it's only strong enough to support two people at any given time. Each of the campers walks at a different speed. One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 minutes, and the slow poke takes 10 minutes to cross. How do the campers make it across in 17 minutes?
Answer, from an anonymous reader:
1 and 2 across (2 minutes)
1 goes back (3 minutes)
5 and 10 go across (13 minutes)
2 goes back (15 minutes)
1 and 2 cross (17 minutes) - and everyone safe and sound
Job: Product Manager
Photo: Jule_Berlin
See the rest of the story at Business Insider
Please follow SAI on Twitter and Facebook.