12 Craziest Google Interview Questions

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

Soljer
Posts: 29
Joined: Fri Feb 27, 2009 6:31 pm UTC

12 Craziest Google Interview Questions

Postby Soljer » Thu Nov 05, 2009 10:34 pm UTC

I'm sure many of you have seen this list before, and I know that some of these questions(or variants thereof) have even been posted on this board before, but I thought some of you might get a kick out of them, and I did a search and didn't find all of these, so here we are:

Source: http://www.esarcasm.com/7243/crazy-goog ... questions/

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

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

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

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

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

    6. If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands?

    7. Suppose we have N companies, and we want to eventually merge them into one big company. How many ways are there to merge?

    8. Why are manhole covers round?

    9. A man pushed his car to a hotel and lost his fortune. What happened?

    10. Explain the significance of “dead beef.”

    11. Design an evacuation plan for San Francisco.

    12. You have eight balls all of the same size. Seven 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?

Some of these don't have 'right' answers, others do. I just want to see the variety of responses that the XKCD population might give. If you want to see some others, here is a list of 140:
http://blog.seattleinterviewcoach.com/2 ... tions.html

User avatar
duckshirt
Posts: 567
Joined: Thu Feb 15, 2007 1:41 am UTC
Location: Pacific Northwest

Re: 12 Craziest Google Interview Questions

Postby duckshirt » Thu Nov 05, 2009 11:01 pm UTC

Some of them seem more like puzzles (I guess that's where some of the questions on the xkcd wiki came from), and some are more like interview questions to test the interviewee's 'personality.' Questions like "how many piano tuners are there in the world" aren't supposed to be trick questions; they just ask because some people will be like "WTF, I dunno," but people who like problem solving will try to work out the problem in their head, like, "well, there are 6 billion people... maybe 1% own pianos... which need to be tuned every couple years, but maybe only 10% are used frequently enough to care... so if they take half an hour each, then............"

Of the ones you listed, I think I have good answers to all except 9 and 10, and probably 11...
lol everything matters
-Ed

Soljer
Posts: 29
Joined: Fri Feb 27, 2009 6:31 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Soljer » Thu Nov 05, 2009 11:48 pm UTC

duckshirt wrote:Some of them seem more like puzzles (I guess that's where some of the questions on the xkcd wiki came from), and some are more like interview questions to test the interviewee's 'personality.' Questions like "how many piano tuners are there in the world" aren't supposed to be trick questions; they just ask because some people will be like "WTF, I dunno," but people who like problem solving will try to work out the problem in their head, like, "well, there are 6 billion people... maybe 1% own pianos... which need to be tuned every couple years, but maybe only 10% are used frequently enough to care... so if they take half an hour each, then............"

Of the ones you listed, I think I have good answers to all except 9 and 10, and probably 11...


The example of piano tuners and golf balls in a school bus, I'd assume, would test your 'back of envelope' estimating skills and critical thinking. Or it could test your personality "How many golf balls can fit in a school bus?" "Depends on how many kids are in there," as I read on one of the sites. Still, it would be interesting to see the personalities of the general XKCDer as well.

User avatar
Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

Re: 12 Craziest Google Interview Questions

Postby Cosmologicon » Fri Nov 06, 2009 12:04 am UTC

Questions 1-3 are known as Fermi problems, and in particular #3 is the archetypal Fermi problem. Apparently Enrico Fermi was known for being good at them, and he once estimated the force of an atomic bomb test as 10 kilotons by dropping some scraps of paper where he was standing 10 miles away and watching how far they drifted. Whenever you're doing one, it never hurts to throw in a B-factor.

User avatar
Brooklynxman
Because I'm Awesome
Posts: 609
Joined: Tue Jan 20, 2009 4:27 pm UTC
Location: Here
Contact:

Re: 12 Craziest Google Interview Questions

Postby Brooklynxman » Fri Nov 06, 2009 12:18 am UTC

Some of them don't even see that hard, and the way to solve it lept out at me immediatly (6 in particular).

Spoiler:
The distance should be an the corresponding angle to 1/4 of 1/12 of a circle, or 1/48 of 360 degrees. I've got 7.5 degrees.

1/4 = 15/60 = how far the hour hand has traveled between 3 and 4.

I assumed the hands were in the exact correct position.
We figure out what all this means, then do something large and violent

The thing about changing the world...once you do it the world's all different.

I'm Angel. I beat the bad guys.

Spoiler:
Image

User avatar
captainwalrus
Posts: 11
Joined: Tue Nov 03, 2009 2:37 am UTC

Re: 12 Craziest Google Interview Questions

Postby captainwalrus » Fri Nov 06, 2009 12:26 am UTC

For the clock one, I had about 40 degrees.
It's over 9 x 10^3!

Nyktos
Posts: 138
Joined: Mon Mar 02, 2009 4:02 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Nyktos » Fri Nov 06, 2009 12:30 am UTC

Question four is equivalent to the Blue Eyes Problem, right?

User avatar
Brooklynxman
Because I'm Awesome
Posts: 609
Joined: Tue Jan 20, 2009 4:27 pm UTC
Location: Here
Contact:

Re: 12 Craziest Google Interview Questions

Postby Brooklynxman » Fri Nov 06, 2009 12:44 am UTC

captainwalrus wrote:For the clock one, I had about 40 degrees.


Errr, at 3:15? They should be really close. At least within an hour of eachother (30 degrees = 1 hour)
We figure out what all this means, then do something large and violent

The thing about changing the world...once you do it the world's all different.

I'm Angel. I beat the bad guys.

Spoiler:
Image

Tirian
Posts: 1891
Joined: Fri Feb 15, 2008 6:03 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Tirian » Fri Nov 06, 2009 1:04 am UTC

duckshirt wrote:Of the ones you listed, I think I have good answers to all except 9 and 10, and probably 11...


Google is your friend on 10. I have to say that I have mad geek cred and had never heard of it before.

9 is a common lateral thinking riddle that you either know or you don't.

Spoiler:
It describes someone making a move in Monopoly, pushing his car token up to an expensive property with an opponent's hotel on it.



11 is probably only asked in the Bay Area offices, but it'd be fair game for them since it's a very obvious problem (and as one who was there for Pretty Big One of 1989, it wouldn't be hard to come up with a better plan than the one that had been in place).

I'm curious as to what people came up with for 1. I estimated 200K in about a minute of talking out loud.

Soljer
Posts: 29
Joined: Fri Feb 27, 2009 6:31 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Soljer » Fri Nov 06, 2009 1:25 am UTC

Here is my first attempt at a few of them:
1.
Spoiler:
Assume that we're talking about a normal school bus (not a short bus, or some sort of extra-sized one) and that a school bus is around eight feet wide. There are around twenty four seats if I can remember back to junior high. Twelve on each side, plus a bit for the driver's area(let's call it just one more 'seating' area). Guestimate that at about three feet per seat. gives a length of thirty nine feet. The height from floor to ceiling of a school bus may be around seven foot? That would mean the volume is 56*39, or around 2240 cubic feet. Let's say a golf ball has a diameter of about two inches. That would mean I could fit 6x6x6 golf balls in a cubic foot, or 216. 216*2240 is around 484,000. Lets go with that minus a bit for seats and what not. 450,000


2.
Spoiler:
Twenty bucks an hour. Screw guestimation .


4.
Spoiler:
This is equivalent to blue eyes, isn't it?


5.
Spoiler:
I wonder if there is something about having proportional super strength due to the square-cube law. Maybe you could jump out? Or perhaps your skin would be adhesive enough to stick to the imperfections in the glass as to climb out?


6.
Spoiler:
This one was answered already, but is pretty simple. A quarter of the distance between 3 and 4 is a quarter of a twelfth of 360 degrees.


8.
Spoiler:
I have three reasons: One, given a square manhole, you'd be able to drop the manhole into the sewer since the length of the diagonal of a square is greater than the length of a side, likewise for other shapes. Two, with a round manhole cover, orientation isn't a problem. Three, rounded objects are stronger - arches and the like.


9.
Spoiler:
Monopoly. I've heard this one before.


10.
Spoiler:
Hexadecimal Magic Number for a few things. Can't recall exactly what.


12.
Spoiler:
Easy enough. Take six of them, put three on each side. If they weigh the same, take the remaining two, weigh them, and find the heavier. Otherwise, Put the three lighter of the original six, and the two you didn't weigh aside, take the three heavier ones, weigh two of them. If one side is heavier, that's the heavier ball, if they're even, the third ball is heaviest.


No idea how to estimate piano tuners, or design an evacuation plan.

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: 12 Craziest Google Interview Questions

Postby skeptical scientist » Fri Nov 06, 2009 5:09 am UTC

Soljer wrote:Here is my first attempt at a few of them:
1.
Spoiler:
Assume that we're talking about a normal school bus (not a short bus, or some sort of extra-sized one) and that a school bus is around eight feet wide. There are around twenty four seats if I can remember back to junior high. Twelve on each side, plus a bit for the driver's area(let's call it just one more 'seating' area). Guestimate that at about three feet per seat. gives a length of thirty nine feet. The height from floor to ceiling of a school bus may be around seven foot? That would mean the volume is 56*39, or around 2240 cubic feet. Let's say a golf ball has a diameter of about two inches. That would mean I could fit 6x6x6 golf balls in a cubic foot, or 216. 216*2240 is around 484,000. Lets go with that minus a bit for seats and what not. 450,000

Spoiler:
You're using a simple cubic lattice packing, which has an efficiency of π/6, or about 52%. You can do a lot better than this: the optimum is about 74%. Of course in practice the best you are likely to obtain is a random close pack, but that is still probably about 60-65% efficient. So you're probably underestimating by 20-50%.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

Tirian
Posts: 1891
Joined: Fri Feb 15, 2008 6:03 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Tirian » Fri Nov 06, 2009 6:41 am UTC

skeptical scientist wrote:
Spoiler:
You're using a simple cubic lattice packing, which has an efficiency of π/6, or about 52%. You can do a lot better than this: the optimum is about 74%. Of course in practice the best you are likely to obtain is a random close pack, but that is still probably about 60-65% efficient. So you're probably underestimating by 20-50%.


Spoiler:
But the seats make the lower half of the bus a pretty total crapshoot anyways. Besides, it's a 100% error that he estimates the diameter of an American golf ball as 2" instead of the regulation 1.68". Still right to within an order of magnitude, which doesn't suck for back-of-the-envelope calculations.

User avatar
phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: 12 Craziest Google Interview Questions

Postby phlip » Fri Nov 06, 2009 6:42 am UTC

skeptical scientist wrote:
Spoiler:
Of course in practice the best you are likely to obtain is a random close pack, but that is still probably about 60-65% efficient.
Spoiler:
MathWorld wrote:Random close packing of spheres in three dimensions gives a packing density of only [imath]\eta \approx 0.64[/imath] (Jaeger and Nagel 1992), significantly smaller than the optimal packing density for cubic or hexagonal close packing of 0.74048.
Huh. Vague memories suggested it was about 50%... it seems vague memories were wrong. And vague.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

User avatar
Goldstein
Posts: 985
Joined: Wed Nov 05, 2008 9:38 pm UTC
Location: Newcastle, UK

Re: 12 Craziest Google Interview Questions

Postby Goldstein » Fri Nov 06, 2009 8:56 am UTC

Question 12 there's a bit weak, isn't it? I heard a similar problem with 12 balls, 3 weighings, and no way to know whether the 'different' ball was heavier or lighter. Have we done that one round these parts?
Chuff wrote:I write most of my letters from the bottom

User avatar
jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

Re: 12 Craziest Google Interview Questions

Postby jestingrabbit » Fri Nov 06, 2009 12:59 pm UTC

Goldstein wrote:Question 12 there's a bit weak, isn't it? I heard a similar problem with 12 balls, 3 weighings, and no way to know whether the 'different' ball was heavier or lighter. Have we done that one round these parts?


I think its deliberate. You see 8, you think powers of 2, which is a red herring.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

mr-mitch
Posts: 477
Joined: Sun Jul 05, 2009 6:56 pm UTC

Re: 12 Craziest Google Interview Questions

Postby mr-mitch » Fri Nov 06, 2009 1:24 pm UTC

1 and 3

Spoiler:
Twice as many as half there are.


1 (more serious...)

Spoiler:
Screw calculations and let's go with a paradox. I choose I can reshape the golfball to any shape I want, therefore I achieve 100% efficiency, no empty spaces, but it's still a golf ball. Today's, 6th Fri Nov 2009, xkcd comic relates to this (a little). The question also states it just has to be inside a bus, screw the chairs (and other obstacles), I'm removing them. I'm going to estimate the size of a bus based on the public transport buses where I live. Therefore they are about 7 (2.1m) feet high inside, It's about 12-20 (lets go with average 16) steps, at a 70cm step distance, that's 11.2m long. Lets also assume they're 4 steps wide, so that's about 280cm,2.8m wide.=> V = 66m³ (approx).
The volume of a golf ball is about 10 pi cm³, or 10 pi x10^-6m³. (r = 2cm)
This means we have about 6.6 million golf balls.

Oh, but wait, atoms are mostly space, let's compact and overlap them using very large frequency vibrations, the golf balls are more like golf balls in this case than the above case. Therefore I can essentially fit millions of golfballs into that 10pi x10^-6m³, dramatically increasing the amount.

But screw this approach, lets extend the paradox just a little. I'm going to rearrange the bus so all the faces of all of the panels everywhere, especially the chassis are pointing in the other direction. It is still a bus, and all the parts are still in their original position (just a different orientation). I then declare the outside of this bus to be the same for each of the panels, i.e. the outside of the bus is internal to the structure. Therefore I can fit an infinite amount of golf balls into the bus. Can you spare a few?


3 (more serious than before)

Spoiler:
World? What does that mean? My world is my life, and there are no piano tuners in my life, until I ask/come across one to tune my piano. I could safely assume I'm only going to ask one, so I would be answering 0, but if I can be bothered, 1. xkcd.com/169'ers, please don't cut off my arm.

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Re: 12 Craziest Google Interview Questions

Postby skeptical scientist » Fri Nov 06, 2009 1:37 pm UTC

jestingrabbit wrote:
Goldstein wrote:Question 12 there's a bit weak, isn't it? I heard a similar problem with 12 balls, 3 weighings, and no way to know whether the 'different' ball was heavier or lighter. Have we done that one round these parts?


I think its deliberate. You see 8, you think powers of 2, which is a red herring.

Any misleading nature of the numbers is made irrelevant by the fact that we are told that two weighings suffice.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

Re: 12 Craziest Google Interview Questions

Postby jestingrabbit » Fri Nov 06, 2009 2:10 pm UTC

skeptical scientist wrote:
jestingrabbit wrote:
Goldstein wrote:Question 12 there's a bit weak, isn't it? I heard a similar problem with 12 balls, 3 weighings, and no way to know whether the 'different' ball was heavier or lighter. Have we done that one round these parts?


I think its deliberate. You see 8, you think powers of 2, which is a red herring.

Any misleading nature of the numbers is made irrelevant by the fact that we are told that two weighings suffice.


Agreed, but you can do nine with two weighings too. I think it must be for red herring purposes.

Anyway, 7 hasn't been tackled yet.

Spoiler:
It'll be the (n-1)th Catalan number if we don't care about the chronological ordering of the mergers.

http://en.wikipedia.org/wiki/Catalan_numbers

If we do care about that, its not something that I'm already aware of.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

User avatar
Briareos
Posts: 1940
Joined: Thu Jul 12, 2007 12:40 pm UTC
Location: Town of the Big House

Re: 12 Craziest Google Interview Questions

Postby Briareos » Fri Nov 06, 2009 2:35 pm UTC

jestingrabbit wrote:Anyway, 7 hasn't been tackled yet.

Spoiler:
It'll be the (n-1)th Catalan number if we don't care about the chronological ordering of the mergers.

http://en.wikipedia.org/wiki/Catalan_numbers

If we do care about that, its not something that I'm already aware of.

Spoiler:
Agreed. It's exactly equivalent to the number of parses of the string "CCC ... C" (n times) using the promiscuous CFG that only contains the rule "C -> CC".
Sandry wrote:Bless you, Briareos.

Blriaraisghaasghoasufdpt.
Oregonaut wrote:Briareos is my new bestest friend.

User avatar
jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

Re: 12 Craziest Google Interview Questions

Postby jestingrabbit » Fri Nov 06, 2009 2:44 pm UTC

Briareos wrote:
jestingrabbit wrote:Anyway, 7 hasn't been tackled yet.

Spoiler:
It'll be the (n-1)th Catalan number if we don't care about the chronological ordering of the mergers.

http://en.wikipedia.org/wiki/Catalan_numbers

If we do care about that, its not something that I'm already aware of.

Spoiler:
Agreed. It's exactly equivalent to the number of parses of the string "CCC ... C" (n times) using the promiscuous CFG that only contains the rule "C -> CC".


Or is it?

Spoiler:
I think we're undercounting. Your C's are indistinguishable, and they should be distinguishable.

Anyway, for the "timing counts" version, you have the relation

[imath]T(n+1) = \frac{n(n+1)}{2}T(n) = \frac{(n+1)(n!)^2}{2^n}[/imath]
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

User avatar
KrazyerKate
Posts: 431
Joined: Sat Oct 17, 2009 2:04 pm UTC

Re: 12 Craziest Google Interview Questions

Postby KrazyerKate » Fri Nov 06, 2009 3:02 pm UTC

Tirian wrote:
skeptical scientist wrote:
Spoiler:
You're using a simple cubic lattice packing, which has an efficiency of π/6, or about 52%. You can do a lot better than this: the optimum is about 74%. Of course in practice the best you are likely to obtain is a random close pack, but that is still probably about 60-65% efficient. So you're probably underestimating by 20-50%.


Spoiler:
But the seats make the lower half of the bus a pretty total crapshoot anyways. Besides, it's a 100% error that he estimates the diameter of an American golf ball as 2" instead of the regulation 1.68". Still right to within an order of magnitude, which doesn't suck for back-of-the-envelope calculations.


Since the goal is to transport golfballs (not children), spending a day or two cutting out the seats shouldn't be a problem. It'd make your calculations much easier and allow for a lot more golfballs.

User avatar
Goldstein
Posts: 985
Joined: Wed Nov 05, 2008 9:38 pm UTC
Location: Newcastle, UK

Re: 12 Craziest Google Interview Questions

Postby Goldstein » Fri Nov 06, 2009 3:13 pm UTC

Also, as it asks how many golf balls you can fit in a school bus, you should consider everything you can possibly do to maximise that number. How much can I bash the shell of the bus into a sphere before we're no longer calling it a bus?
Last edited by Goldstein on Fri Nov 06, 2009 3:14 pm UTC, edited 1 time in total.
Chuff wrote:I write most of my letters from the bottom

User avatar
jaap
Posts: 2094
Joined: Fri Jul 06, 2007 7:06 am UTC
Contact:

Re: 12 Craziest Google Interview Questions

Postby jaap » Fri Nov 06, 2009 3:14 pm UTC

Re #7: Does the order of independent mergers matter?
For example, if A and B merge, and then C and D, would that be the same or different to C and D merging first and only then A and B?

Assuming the order of independent mergers does not matter:
Spoiler:
If n companies merge, there are 2n-1 companies that exist at some time during that sequence.
To see that think of it in reverse - splitting instead of merging. Each split creates two new companies. There have to be n-1 splits in order to make n companies out of 1. Each split creates two never before seen companies. Therefore there are 1+2(n-1) = 2n-1 companies that are in existence at some time or another.

Let f(n) be the number of ways n companies can merge. A series of mergers of n+1 companies can be turned into one of n companies simply by taking away the first merger that involves that (n+1)th company. Conversely, creating a merger sequence for n+1 involves taking a sequence for n companies, and and adding in the merger for the (n+1)th somewhere. It has to merge with one of the 2n-1 available, so we get
f(n+1)= (2n-1)f(n)
Also f(1)=1.
[math]f(n) = 1 \times 3 \times 5 \times \dots \times 2n-3[/math]

So if I'm not mistaken,
[math]f(n) = \frac{(2n-2)!}{(n-1)! 2^{n-1}}[/math]


Assuming the order of independent mergers does matter:
Spoiler:
If the ordering does matter even for independent mergers, then instead of 2n-1 companies to choose from there are n(n+1)/2 to choose from.
[math]f(n) = \prod_{k=1}^{n-1}{\frac{k(k+1)}{2}} = \frac{(n-1)!n!}{2^{n-1}}[/math]
Last edited by jaap on Fri Nov 06, 2009 11:05 pm UTC, edited 1 time in total.

User avatar
kernelpanic
Posts: 891
Joined: Tue Oct 28, 2008 1:26 am UTC
Location: 1.6180339x10^18 attoparsecs from Earth

Re: 12 Craziest Google Interview Questions

Postby kernelpanic » Fri Nov 06, 2009 5:55 pm UTC

Nyktos wrote:Question four is equivalent to the Blue Eyes Problem, right?

Yes.

3:
Spoiler:
I'd go for this:
Assume all pianos are tuned once a year.
((no. of people with a piano)/(no. of people on the world))/(avg. no. of people in households with >= 1 piano). This is the no. of pianos. let's call it p.
let a = cost of tuning 1 piano
let s = avg. yearly salary of a piano tuner.
s/a = pianos tuned by a tuner in a year (lets call it n)
p/n = no. of piano tuners.

You obviously need lots of preliminary data.


4:
Spoiler:
After 99 days, all husbands are killed


5:
Spoiler:
the blender is empty, so just lie down and avoid the blades


6:
Spoiler:
0+(((1/4)*(1/12))*360) = 7.5°


7:
Spoiler:
I don't know, something to do with nPr


12:
Spoiler:
Weigh 3 on each side, if there is no difference, discard the six and measure the remaining two, then get the heavier one.
If there is a difference, discard the lighter three and the remaining two, then weigh one on each side. get the heavier one, but if there is no difference then it is the other one.
I'm not disorganized. My room has a high entropy.
Bhelliom wrote:Don't forget that the cat probably knows EXACTLY what it is doing is is most likely just screwing with you. You know, for CAT SCIENCE!

Image

User avatar
Brooklynxman
Because I'm Awesome
Posts: 609
Joined: Tue Jan 20, 2009 4:27 pm UTC
Location: Here
Contact:

Re: 12 Craziest Google Interview Questions

Postby Brooklynxman » Fri Nov 06, 2009 6:23 pm UTC

12
Spoiler:
Weigh 3 on each side. If all are same just weigh remaining two, heavier is the right one. If one set of three is heavier, weigh two of the remaining balls. If they are the same, its the third, if not, then the heavier is the heavier (gee who woulda though)
We figure out what all this means, then do something large and violent

The thing about changing the world...once you do it the world's all different.

I'm Angel. I beat the bad guys.

Spoiler:
Image

User avatar
KrazyerKate
Posts: 431
Joined: Sat Oct 17, 2009 2:04 pm UTC

Re: 12 Craziest Google Interview Questions

Postby KrazyerKate » Sat Nov 07, 2009 1:39 am UTC

Goldstein wrote:Also, as it asks how many golf balls you can fit in a school bus, you should consider everything you can possibly do to maximise that number. How much can I bash the shell of the bus into a sphere before we're no longer calling it a bus?


well if you want to go that way, we should also ask how much you can crush the golfballs before we're no longer calling them golfballs. It'd be a lot easier on the calculation if you had zero space in between golfballs (i.e if they were cubes or ground into powder).

User avatar
phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: 12 Craziest Google Interview Questions

Postby phlip » Sat Nov 07, 2009 10:33 am UTC

Well, if you had a black hole made out of golf balls, you could make it as big as you wanted until you couldn't fit the Schwarzchild radius within the bus, because then the black hole would start absorbing the bus. As long as the bus is entirely outside the event horizon, it could theoretically remain intact with sufficiently rigid unobtanium.

Maybe even look into the shear strength of the average bus, find out how much gravity/tides it could survive, and make a black hole that big.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

glubaglubglub
Posts: 1
Joined: Sat Nov 07, 2009 7:35 pm UTC

Re: 12 Craziest Google Interview Questions

Postby glubaglubglub » Sat Nov 07, 2009 7:38 pm UTC

Registered to post that #4 is the worst variation of that puzzle I have ever read. They aren't even perfect logicians.

Tirian
Posts: 1891
Joined: Fri Feb 15, 2008 6:03 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Tirian » Sat Nov 07, 2009 8:06 pm UTC

Let's keep in mind that the questions are intended to evoke facets of the interviewee's personality, not rigorous answers. Are you the sort of person who is boggled by a logic puzzle, the sort that dives in and muddles for a little while, or the sort that already knows the answer and can cruelly dissect your presentation of it? There's not a wrong answer there; you probably want all sorts of different sorts of problem solvers on a team. On the other hand, if you're the sort of person who would destroy a school bus and several hundred thousand golf balls in the name of precision, that's the sort of thing they'd want to know too. :lol:

(Me, I used to maintain the rec.puzzles FAQ, so I sure appreciate such a natural opportunity to work that into a Google interview.)

Dr. Willpower
Posts: 197
Joined: Wed May 28, 2008 3:55 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Dr. Willpower » Sat Nov 07, 2009 10:36 pm UTC

phlip wrote:
Spoiler:
Huh. Vague memories suggested it was about 50%... it seems vague memories were wrong. And vague.


Spoiler:
Maybe you're thinking of the episode of Mythbusters in which Adam estimated the packing efficiency of ping pong balls to be about 50%. I believe they were trying to float a sunken ship using only ping pong balls.
Image
Hat me, bro

User avatar
kernelpanic
Posts: 891
Joined: Tue Oct 28, 2008 1:26 am UTC
Location: 1.6180339x10^18 attoparsecs from Earth

Re: 12 Craziest Google Interview Questions

Postby kernelpanic » Sun Nov 08, 2009 1:57 am UTC

Tirian wrote:There's not a wrong answer there

Oh, yes there is.
Spoiler:
For the clock one, it's 7.5°. There is no way over it.
There is only one solution for 4, 7, 12.
I'm not disorganized. My room has a high entropy.
Bhelliom wrote:Don't forget that the cat probably knows EXACTLY what it is doing is is most likely just screwing with you. You know, for CAT SCIENCE!

Image

mr-mitch
Posts: 477
Joined: Sun Jul 05, 2009 6:56 pm UTC

Re: 12 Craziest Google Interview Questions

Postby mr-mitch » Sun Nov 08, 2009 5:07 am UTC

glubaglubglub wrote:Registered to post that #4 is the worst variation of that puzzle I have ever read. They aren't even perfect logicians.


Nor are we, but we can solve the problem, so why can't they?

User avatar
phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: 12 Craziest Google Interview Questions

Postby phlip » Sun Nov 08, 2009 5:23 am UTC

mr-mitch wrote:Nor are we, but we can solve the problem, so why can't they?
Spoiler:
Yeah, but it needs to be common knowledge that everyone is a perfect logician...

Like, if I'm blue eyes wife number 100, so I see 99 other blue-eyed people cheating husbands, I need to know that if my husband was honest, and had never cheated on me, then the other 99 wives would be able to figure that out after 98 days, and kill their husbands on day 99. If I'm not sure they'd be able to figure that out, then I wouldn't be able to know for sure that my husband is cheating.

Declaring that it's common knowledge that everyone involved to be a perfect logician is the easiest way to make it known that they would be able to figure that out.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

Szech
Posts: 5
Joined: Wed Aug 26, 2009 5:56 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Szech » Wed Nov 11, 2009 1:17 am UTC

Here's what I got. I'm not the least bit bitter that I never made it to Google's interview process where I might be given one of these, but rather, was weeded out at the self-evaluation:

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

Spoiler:
Per wikipedia, a golf ball has a diameter of 1.68". A school bus has interior dimensions of 35' x 7.5' x 6.5', per this guy: http://www.vonslatt.com/bus-main.shtml. If we're not packing the golf balls in, I'd treat them like cubes: [math](35 * 12) * (7.5 * 12) * (6.5 * 12) / (1.68 ^ 3) = 621,811[/math]. If we're packing them in, multiply by 4/3: 829,081


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

Spoiler:
$40 an hour. Damn skyscrapers.


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

Spoiler:
World population of ~6,706,993,152, per *ahem* Google.
Assume 1 in 10 can play piano
Assume 1 in 3 piano players will own a piano
Assume 3 piano players will lay claim to the same piano
Assume 1 in 2 pianos get tuned
Assume those pianos get tuned once every two years
Assume that to be profitable, a piano tuner must tune one piano each working day, taking two weeks off for vacations (50 * 5 = 250 pianos a year)

6,706,993,152
* 1/10
* 1/3
* 1/3
* 1/2
* 1/2
* 1/250
= 74,522 piano tuners in the world.


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

Spoiler:
The women confer regarding how many cases of adultery they are aware of that day. Every woman who is aware of a lower number than the highest number stated will kill her husband. If in the extreme case that every man has cheated, every woman will be aware of 99 cases of adultery, and they all kill their husbands.


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

Spoiler:
Try to pee myself and use the surface tension of my pee to climb the sides.


6. If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands?

Spoiler:
Minute hand is at 90, hour hand is at 90 + ( (360 / 12) * (15 / 60) ) = 97.5
97.5 - 90 = 7.5 degrees


7. Suppose we have N companies, and we want to eventually merge them into one big company. How many ways are there to merge?

Spoiler:
You're initially picking two of the companies to merge, and putting it back into the pool as one element, before picking two companies to choose again, stopping when you have two companies left to merge, so: C(N,2) * C(N-1,2) * ... * C(2,2)

Merge2 = 1
Merge3 = C(3,2) * Merge2 = 3 * 1 = 3
Merge4 = C(4,2) * Merge3 = 6 * 3 = 18
Merge5 = C(5,2) * Merge4 = 10 * 18 = 180

Perhaps someone better at math than I can reduce that into a simple function.


8. Why are manhole covers round?

Spoiler:
So they won't fall in the hole.


9. A man pushed his car to a hotel and lost his fortune. What happened?

Spoiler:
He was on a dark desert highway, and had to stop for the night. Checked into the Hotel California, and discovered an underbelly to high life. He lost his values and fortune, and while he was able to check out, he could never leave (broken down car). Once while gathering for a feast, he stabbed with his steely knife, but just couldn't kill the beast.


10. Explain the significance of “dead beef.”

Spoiler:
Tupac Shakur and Biggie Smalls had beef, but then they died, and the beef calmed down. Then someone made a movie about them, featuring a track that merged recordings from the two, and the beef was officially dead. The significance of the dead beef is that you can no longer cross your middle/ring fingers and yell "West side," nor can you make an 'E' with your right hand and yell "East side."


11. Design an evacuation plan for San Francisco.

Spoiler:
Assuming city infrastructure is still in place, everyone North of Fulton crosses the Golden Gate bridge and hangs out in the North Bay. Non-motor vehicles use lanes designated for return traffic. Everyone else use a combination of the Bay Bridge, and city streets to go to Oakland and Daly City respectively. Take the BART if you can. There's probably traffic.


12. You have eight balls all of the same size. Seven 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?

Spoiler:
For the set {1-8}, weigh {1-3} against {4-6}
If they balance, weigh 7 against 8, and pick the heaver one.
Else If {1-3} weighs more than {4-6}, weigh 1 against 2
-->If they balance, pick 3
-->Else, pick the heavier one
Else weigh 4 against 5
-->If they balance, pick 6
-->Else, pick the heavier one

sq_ocelot
Posts: 69
Joined: Wed Feb 18, 2009 5:44 pm UTC
Location: USA

Re: 12 Craziest Google Interview Questions

Postby sq_ocelot » Wed Nov 11, 2009 1:36 am UTC

What I thought of when I read the "dead beef" one was that

Spoiler:
it's redundant. Beef is a cow that is ready (more or less) to be eaten. It's dead. When it's alive, we call it a cow. What we call beef is necessarily dead, so "dead beef" is redundant.
Rachel! wrote:squocelot sounds like a delicious animal/vegetable hybrid and I should like to eat it someday

User avatar
WarDaft
Posts: 1583
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: 12 Craziest Google Interview Questions

Postby WarDaft » Wed Nov 11, 2009 1:54 am UTC

Spoiler:
Dead Beef is an extremely important component in the manufacturing of hamburgers.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.

stormfire908
Posts: 14
Joined: Mon Nov 23, 2009 10:08 pm UTC

Re: 12 Craziest Google Interview Questions

Postby stormfire908 » Thu Nov 26, 2009 9:37 pm UTC

I've heard of a much better version along the lines of 12; all of them do the same type of idea, just get more complex. The problem was you have 80 coins with one counterfeit and it's lighter, you get 4 weighings to determine the counterfeit one. A much harder question is how many weighings you need for n amount of coins or balls; now that would be a crazy interview question. Plus heres my crack at probably the easiest one, the clock at 315 angle problem
Spoiler:
At three fifteen, if the hour hand can't move, it would be 0 degrees. But if it does move, it's not that ridiculous to find out. There are 12 hours on a clock, and 360 degrees. So that gives us 30 degrees each hour change. 15 minutes if a quarter of an hour, so we just take a quarter of 30 degrees and get 7.5 degrees.

User avatar
Yakk
Poster with most posts but no title.
Posts: 11129
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: 12 Craziest Google Interview Questions

Postby Yakk » Thu Nov 26, 2009 10:53 pm UTC

5. 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?
Spoiler:
Climb the glass, or take off your clothing and flap it to fly. Your density might be constant, but your surface area:mass ratio is through the roof. That means your ability to push against air/glass will be ridiculous.

Your bones and the like will also be ridiculously overbuilt for your scale.

Sadly, you are probably going to die nearly instantly, because at your new scale, your internals have next to no chance of working.

6. If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands?
Spoiler:
15 minutes is pointing right at the 3.

15 minutes is 1/4 of an hour. An hour is 1/12 of the circle. A circle is 2 pi. The hour hand will have moved 1/4 of 1/12 of the circle.

2 pi / 4 / 12 = pi/24.

So 1/24 pi on a 12 hour clock.

7. Suppose we have N companies, and we want to eventually merge them into one big company. How many ways are there to merge?
Spoiler:
Assuming pair-wise merges...

The number of ways to merge any 2 of N companies is N choose 2, or N(N-1)/2.

We repeat this process N-1 times, each time on 1 fewer company, and we get N!(N-1)!/2^N.

Now, if we allow 3-way or more merges at any one step, things get much more crazy. I'm not sure how to calculate that practically... anyone?

8. Why are manhole covers round?
Spoiler:
This is the shape of the worker's tummy

12. You have eight balls all of the same size. Seven 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?
Spoiler:
Google the problem
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Jeff_UK
Posts: 67
Joined: Sat Nov 03, 2007 10:38 pm UTC

Re: 12 Craziest Google Interview Questions

Postby Jeff_UK » Fri Nov 27, 2009 1:49 pm UTC

Soem answers, mostly facetious :)

1. How many golf balls can you fit in a school bus?
Spoiler:
None, I don't have any golf balls


3. How many piano tuners are there in the entire world?
Spoiler:
about 6 billion, Depending on your definition of 'Piano Tuner.' Someone who attempts to tune pianos but doesn't call themselves a piano tuner, surely is one, and equally, someone who calls themselves a piano tuner but never gets any work is still a piano tuner. Therefore, is not someone who does not call themselves a piano tuner AND has never had the opportunity to tune a piano still a piano tuner?


4.
Spoiler:
I contest that the response of every woman on this island will be "yes, I already know that there's an unfaithful man on this island, so that statement does not give me any additional informationl; therefore I still don't know if my husband is faithful"


5. 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?
Spoiler:
if someone about 100 times my size is intent on killing me, I'd probably be resigned to my fate and let myself get hit


8. Why are manhole covers round?
Spoiler:
Because manholes are round


9. A man pushed his car to a hotel and lost his fortune. What happened?
Spoiler:
There are many potentially correct answers here, none of them, even the popular one, can be given without assumptions, so it's just as right to suppost that he lost a point-to-point rally on which he'd bet all his money, or some other kind of wager.. OR that he'd invested all his money in the car, and it was now broken
"Please only print this post if you really need to"
...hmm....I wonder how much extra energy is required to generate that request...We need a cost/benefit analysis, STAT!

User avatar
Blatm
Posts: 638
Joined: Mon Jun 04, 2007 1:43 am UTC

Re: 12 Craziest Google Interview Questions

Postby Blatm » Fri Nov 27, 2009 8:43 pm UTC

A few more:

5. 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?
Spoiler:
Duck.


8. Why are manhole covers round?
Spoiler:
So they can be rolled along the ground.


9. A man pushed his car to a hotel and lost his fortune. What happened?
Spoiler:
He was fined for the damages.


10. Explain the significance of “dead beef.”
Spoiler:
It tastes good.


Return to “Logic Puzzles”

Who is online

Users browsing this forum: No registered users and 5 guests