Here is a list of 10 puzzles which have been asked on a Google Interview. They are not in any specific order.
A certain town comprises of 100 married couples. Everyone in the town lives by the following rule: If a husband cheats on his wife, the husband is executed as soon as his wife finds out about him. All the women in the town only gossip about the husbands of other women. No woman ever tells another woman if her husband is cheating on her. So every woman in the town knows about all the cheating husbands in the town except her own. It can also be assumed that a husband remains silent about his infidelity. One day, the mayor of the town announces to the whole town that there is at least 1 cheating husband in the town. What do you think happens? Answer
5 Pirates Fight for 100 Gold Coins
Five pirates discover a chest containing 100 gold coins. They decide to sit down and devise a distribution strategy. The pirates are ranked based on their experience (Pirate 1 to Pirate 5, where Pirate 5 is the most experienced). The most experienced pirate gets to propose a plan and then all the pirates vote on it. If at least half of the pirates agree on the plan, the gold is split according to the proposal. If not, the most experienced pirate is thrown off the ship and this process continues with the remaining pirates until a proposal is accepted. The first priority of the pirates is to stay alive and second to maximize the gold they get. Pirate 5 devises a plan which he knows will be accepted for sure and will maximize his gold. What is his plan? Answer
You are given 8 identical looking balls. One of them is heavier than the rest of the 7 (all the others weigh exactly the same). You a provided with a simple mechanical balance and you are restricted to only 2 uses. Find the heavier ball. Answer
You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum number of floors from which the egg can be dropped without breaking it. What is the minimum number of tries needed to find out the solution? Answer
Four People on a Rickety Bridge
Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge? Answer
In a country where everyone wants a boy, each family continues having babies till they have a boy. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same) Answer
Probability of a Car Passing By
The probability of a car passing a certain intersection in a 20 minute windows is 0.9. What is the probability of a car passing the intersection in a 5 minute window? (Assuming a constant probability throughout) Answer
You have a stream of bytes from which you can read one byte at a time. You only have enough space to store one byte. After processing those bytes, you have to return a random byte. Note: The probability of picking any one of those bytes should be equal. Answer
How would you cut a rectangular cake into two equal pieces when a rectangular piece has already been cut out of it? The cut piece can be of any size and orientation. You are only allowed to make one straight cut. Answer
Two old friends, Jack and Bill, meet after a long time.
Jack: Hey, how are you man?
Bill: Not bad, got married and I have three kids now.
Jack: That’s awesome. How old are they?
Bill: The product of their ages is 72 and the sum of their ages is the same as your birth date.
Jack: Cool… But I still don’t know.
Bill: My eldest kid just started taking piano lessons.
Jack: Oh now I get it.
How old are Bill’s kids? Answer
How many can you answer in the first attempt? Post in comments.
Feel free to add to this list or leave a comment. Please tweet, Digg or Stumble.
Related posts:

The Boys and Girls question reminds me of people who think they have a roulette system. No matter when you stop or start, you can’t get around the fact that each individual roulette bet is a losing one, and these couples can’t get around the fact that each individual birth is 50/50.
i knew 4 of them already (cheating, pirates, bridge and children age) the others the only one i didnt got at the first try was the eggs problem optimal solution.
For the question “How old are my children”, arent a lot of possibilities neglected? eg – Why arent there any children with age 1?
9, 8, 1
24, 3, 1
18, 4, 1
36, 2, 1
12, 6, 1
In this case, in addition to the two cases which add up to 14 (as pointed out in the solution), there is another case wherein the ages add up to 13:
12, 6, 1 (sum=13)
6, 4, 3 (sum=13)
Why is this case ignored? Isnt more data required to “break the tie” and get a unique solution?
Hi Amol, Thanks for pointing that out. I have added all the options. 12, 6, 1. The sum is 19 not 13 so there will not be a conflict in that case.
Awesome post. Thanks!
Great post. Thanks!
he couldn’t make decision, therefore there must be at least two combinations which add up to his birth date
so if you list all the possible cases you’ll see that there are
2+6+6=14
3+3+8=14
then he mentioned eldest kid so answer is 3 3 8, because there is no eldest kid in 2 6 6.
OMG I was asked the question about piece of cake when I was in 6th grade
you drow a line that goes on centers of both rectangles.