Solutions to Crazy Questions at Google Job Interview

We are providing solutions to the Crazy Questions at Google Job Interview post By Thiomir


  1. How many golf balls can fit in a school bus?

    Solution: The point of the question isn't to see how golf balls you think are in the bus, but to see what your deduction skills are like. Do you just make a random guess or try to cop out by saying a lot, or do you actually try to come up with a legitimate answer by going through a logical series of steps.


  2. You are shrunk to the height of a nickel and your mass is proportionally reduced so as to maintain your original density. You are then thrown into an empty glass blender. The blades will start moving in 60 seconds. What do you do?


    Solution:You simply jump out. As you are scaled down, the ratio of muscle mass to total mass remains the same. Potential energy is given by E = mgh. So, if E/m is unchanged (where E is the energy expended in expanding your leg muscles, and m is your mass), then h is unchanged. Mini-me jumps as high as me. This is the reason why grass-hoppers can jump about as high as people.


  3. How much should you charge to wash all the windows in Seattle?

    Solution:As crazy as it might sound, questions like these demonstrate your ability to think through a complex problem with little or no information. They expect you to take an educated guess. Most of the time you can ask them questions like - how many buildings are there in Seattle.


  4. How would you find out if a machine’s stack grows up or down in memory?

    Solution:Instantiate a local variable. Call another function with a local. Look at the address of that function and then compare. If the function's local is higher, the stack grows away from address location 0; if the function's local is lower, the stack grows towards address location 0.


  5. Explain a database in three sentences to your eight-year-old nephew.

    Solution:A database is like a file cabinet. The files, or data, is stored in it and can be arranged in categories. But unlike an actual file cabinet, you can do a lot more cool stuff with a database like being able to make it accessible through the internet.


  6. How many times a day does a clock’s hands overlap?

    Solution:The Hour hand and Minute hand would be meeting exactly 11 times in 12 hours (Hour hand would have taken 1 clockwise round and Minute hand would have taken 12 clockwise rounds, so 12 - 1 = 11 rounds).

    result: First time hour and minute hands overlap will be 12 Hours / 11 = 01:05:27.27. So at this time only hour and minute hands would be overlapping and second hand will not be any near to them. Similarly for 2nd, 3rd, 4th, 5th, 6th, 7th, 8th, 9th and 10th overlap of hour and minute hand the Second hand wont be any nearby. So all 3 hands (hour, minute and Second) overlap only 2 times i.e. (0:0:0 and 12:0:0).

    Also we all know when we get our watches repaired, normally the repairman overlaps all the three hands to 12.

    If we are considering that the second hand is not present, then the rest two overlaps 22 times in 24 hours.

    There again is a catch, if we check the angles by which the hour hand and minute hand moves.

    The second hand moves 6 degree in a second. In that time the minute hand will move 6/60 degrees. and the hour hand will move 6/(60*12) degrees. now taking these things in the considerations. if we check the positions of the hour and minute hand in terms of angle from the marker 12, for our first rendezvous time, i.e. 01:05:27.27 sec.
    first thing that comes to my mind is that, there is fraction in the seconds. So that time can’t be measured. there will be no exact overlap. now lets calculate the angles:

    1 hour 5 mins and 27 seconds = 3600 + 5*60 + 27 = 3927 seconds.

    angle of hour hand = 3927 * 6/(60*12) = 32.725 degree.
    angle of minute hand = 3927 * 6/60 = 392.7 degree
    subtracting 360 degree from it we get - 32.7 degree.

    So at 01:05:27 both hands don’t overlap. Now for 01:05:28 :
    Angles : hour hand - 32.73333
    minute hand - 32.8
    so obviously they dont meet at 01:05:28 either.

    So they overlap at 12:00 and 24:00 only. So the answer is 2 only.



  7. You have to get from point A to point B. You don’t know if you can get there. What would you do?

    Solution:Utilizing a “learn as you go” approach and applying collected knowledge and data along the way is the best way to proceed. Let’s break this down farther.

    Determine the amount of time you have to go from point A to point B. Spend the initial 20% of that time making a 360° search with the largest circumference possible with the in the time you have allowed.

    During that time, ask people, look for maps, clues, collect data, and knowledge. At the end of the initial 360° search take an objective look at all the information you have obtained and you calculate the risk of failure you are willing to live with. Create a plan and a strategy based on your assessment of where you believe point B to be. Then you proceed on implementing your plan with predetermined intervals of reassessment and strategy improvements.

    This is the best chance you have reaching point B if you don’t know if you can get there.


  8. Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?

    Solution:Let’s suppose there are
    a set of attributes of each shirt you are interested in: e.g. sleeve length, color, buttons (no buttons, fully button, partially buttoned from collar to chest level).
    Let’s say the closet is a simple wall closet with a single closet rod running the entire length of closet. On the left you put all the short sleeve shirts, and on the right the long sleeve shorts. You separate then long and short sleeve sides with a specially marked coat hanger. Then you separate each group into no buttonoed, partially buttoned, and fully button, using more specially marked hangers. Then each sub group is separated into colored and monochrome sub-sub-groups (specially marked hangers aren’t needed for separators unless you are color blind) Then each colored group is sorted left to right according to the color spectrum: ROYGBIV: red, orange, yellow, green, blue, indigo, violet. Each monochrome ggroup is sorted left to right: white on the left, black on the right, and shades of grey in the middle, the darker greys on the right, the lighter on the left.


  9. 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?

    Solution:1. There is only one cheat husband
    - If it is so then 99 wives knew it before. So the cheated wife got the idea from queen that her husband is cheating. So she will kill him. Next morning every wife will know there is no cheat husbands anymore.


    2. There are more than one cheat husbands

    - In this case, all of the wives already had the idea prior to queen's information. Its just that the cheated wives knew the count which is one less than what the non-cheated wives' knew - thats all. i.e. if there were 2 cheat husbands then their wives knew the count is 1 and others knew its 2. So the queen just repeated the info saying "at least 1". Same goes to 2,3,4...100 cheat husbands. So in this case no wife kills her husband.


  10. In a country in which people only want boys, every family continues to have children until they have a boy. if they have a girl, they have another child. if they have a boy, they stop. what is the proportion of boys to girls in the country?

    Solution:From pure probability,we get the expected number of girls born to be 1/2 with that of boys being 1.So the ratio is 2:1


  11. 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)?

    Solution:If the chance to see the car is 10 percent per minute, the first minute you have 10% chance, the second minute you have 10% of 90% = 9% (so total 19%), the third minute 10% of 81% (= 8,1%, total 27,1 %) ......
    As the chance for 30 minutes is 95 percent, the chance for 1 minute is 9.5% and for 10 minute 63.1 %.


  12. If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands? (The answer to this is not zero!)

    Solution:7.5 degrees (the hour hand is 1/4th of the way between 3 and 4, the angle measure of that is 360/12 = 30 degrees between hours / 4 = 7.5 degrees).


  13. 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?

    Solution:1 and 2 cross, taking 2 minutes, 1 goes back carrying the flashlight total=3 minutes. 5 and 10 cross, taking 10 minutes totaltime now= 13 minutes, 2 goes back,total time now = 15 minutes. 1 and 2 cross again, taking 2 minutes making it 17 minutes.


  14. You are at a party with a friend and 10 people are present including you and the friend. your friend makes you a wager that for every person you find that has the same birthday as you, you get $1; for every person he finds that does not have the same birthday as you, he gets $2. would you accept the wager?

    Solution:No.


  15. How many piano tuners are there in the entire world?

    Solution:1) At first list out all the piano manufacturing companies in the world.
    2) Then look into their purchase records and find out the piano purchasers information.
    3) i) If the purchase is made by an individual or a house hold then the piano is played at best case by all the people of the house.
    ii) Else if the piano is purchased for school then list out the students that opted the piano course in their music curriculum.
    iii) If the piano is purchased by a Church then count the no of major or minor events of the church and count the piano users.
    sum up all the numbers to get more or less accurate piano users count.


  16. You have eight balls all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you find the ball that is heavier by using a balance and only two weighings?

    Solution:choose 6 balls and weigh 3 against 3
    - if they weigh the same, you have another weighing for the remaining 2 balls and you can find the heavier one
    - if they don’t weigh the same, from the group of 3 which was heavier, choose any 2 balls and weigh them:
    - if they weigh the same, the remaining ball is the heavier one; otherwise you just found the heavier one by weighing the 2 chosen balls.


  17. You have five pirates, ranked from 5 to 1 in descending order. The top pirate has the right to propose how 100 gold coins should be divided among them. But the others get to vote on his plan, and if fewer than half agree with him, he gets killed. How should he allocate the gold in order to maximize his share but live to enjoy it? (Hint: One pirate ends up with 98 percent of the gold.)

    Solution:The highest ranked pirate gets 98 gold coins
    ---Two pirates get 1 gold coin each
    ---The other 2 pirates get nothing.

16 comments:

  1. Awsome Work man u r a genious

    ReplyDelete
  2. about the overlaping hands...they didn't say they overlap at the exact same point for an extended period of time, just overlap...it's impossible for them not to overlap less than 22 times a day, it's just that there's no point other than 12:00 where they overlap for a whole minute, but the split second where the minute hand passes over the hour hand counts, doesn't it?

    my solution for number 8
    get rid of some shirts, I don't need that many

    and about #16
    why not put 4 balls on each side of the balance, take two balls(one from each side), if the balance levels, then the one you took away from the heavier side is the heaviest, if not, repeat...i don't get why get so complicated as to put 6 balls first...

    ReplyDelete
  3. also check some good interview questions with answers at http://www.interviewduniya.com

    ReplyDelete
  4. I disagree with your answer to 11.
    You wrongly assume that any probability in any time period is dependant on any other time period that has passed or will pass. The question is not, for example "what is the likelyhood of seeing a car in a minute if you have not seen a car in the previous minute"
    The traffic is a constant, independant of the observer - the cars will pass whether they are observed or not.
    The traffic will not increase or decrease according to what has already passed, but the probability IS dependant on time.

    a car passes on average every 30/0.95 = 31.57894737 minutes.
    this will not increase just because you've already sat there watching nothing. If the probability of seeing a car in ANY 10 minute period during the day is 63% as you suggest, that would mean a car would pass on average every 10/0.6316 = 15.83 minutes which is not right.

    ReplyDelete
  5. 10 isn't right. If you draw a branch diagram you'll see the ratio is 1 to 1. One way to do it is make the simplifyign assumption that every 2 years a family will have a kid unless they have a boy and there are 16 families

    at year 0
    8 boys and
    8 girls are born.

    at year 2
    4 boys and
    4 girls are born

    at year 4
    2 boys and
    2 girls are born

    etc

    the pirate problem is also technically right but the only way it works is if pirate 1 gives one coin to pirates 2 and 4. This is because of the heirarchy. You can solve with game theory if you assume that the highest rank pirate must divide the coins if the allocation was voted against and the previous top pirate was killed.

    ReplyDelete
  6. Question 9 is wrong
    If there are two cheated husbands, their wives won't kill them in the first day. On the next day they can figure out there are more than one cheated husbands and kill them.
    If there are three cheated husbands, their wives won't kill them in the first and second day, so will kill in the third day. If all men are cheaters, all of them will be killed after 100 days.

    ReplyDelete
  7. "15. How many piano tuners are there in the entire world?

    Sum up all the numbers to get more or less accurate piano users count."

    Whoops, missed that one! Unless tuners == users, you've answered the wrong question.

    ReplyDelete
  8. 9 is not right too. you can find the solution on the net. all cheaters get killed at the end.

    ReplyDelete
  9. a couple of these answers are wrong...

    ReplyDelete
  10. Another Possible Solution to Problem 2.
    A: Jump onto a blade of the blender and hold the shaft of the blades tightly. Since you are now a part of the blade itself, they can't chop you.

    ReplyDelete
  11. its too confusing

    ReplyDelete
  12. Great thoughts you got there, believe I may possibly try just some of it throughout my daily life...

    Job Interview Questions

    ReplyDelete
  13. Really awesome. I appreciate your work. Thank you.

    Upcoming Bank Exams

    ReplyDelete
  14. Hi!
    Guys,
    You can see all type question and answer of Interview...
    You can Click Here: Job Interview Questions

    ReplyDelete
  15. Tks very much for your post.

    Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

    You also find all interview questions at link at the end of this post.

    Source: Interview Questions & Answers:

    Best rgs

    ReplyDelete