

How to Ace that Google Dev Interview - Gayle
http://www.technologywoman.com/2012/01/31/how-to-ace-that-google-dev-interview/

======
mdwrigh2
Some advice from someone who sat on Google's Hiring Committee for about 20
months:
[https://plus.google.com/101174951617223562800/posts/2UE1Y815...](https://plus.google.com/101174951617223562800/posts/2UE1Y815a98)

Having said that, Cracking the Coding Interview is a fantastic book for
technical interviews. I've always been skeptical of this kind of book, but
after having interviewed at Google, MS and Amazon, I can say that most of the
questions were similar to ones from the book, if not directly from it. So
thanks for writing it Gayle :)

~~~
Gayle
Thanks :)

And as an ex-hiring committee member myself, I agree with everything Collin
there said too. And it pains me that people write blogs / books promoting this
brain teaser stuff. Such a disservice to candidates...

------
tzs
Ignoring the issue of whether or not Google has or has not ever asked the
blender question, is there a reasonable answer to it?

All I can come up with are:

A. Get down as flat as possible, so that the blades will be above you.
Probably near the shaft. Exact orientation and positioning depends on the
blender.

B. Sit down and wait. It's not really going to kill you. It's just a version
of the Kobayashi Maru test, to see what you do in an un-winnable situation.

~~~
robobenjie
Here is what I have come up with.

Using conservation of energy:

When you jump your legs do work that gets converted in to kinetic energy and
then potential energy.

Assume that when you are shrunk down you maintain density. The potential
energy that you have at the top of a jump is mgh. (mass * gravitational-
constant * jump-height). When you scale your body down your mass goes down
with the cube of the scaling, which I'll call k. So after scaling your energy
would be mgh/(k^3) (m is your original mass).

So how does the initial work change as you scale. The force (F) you can apply
is roughly proportional to the cross section of your muscles. This changes
with k^2. You integrate this over the path that your center of mass takes,
which is going to change linearly with your scale k (d). That means that the
work going in should be proportional to 1/k^3 as well!

So we can make two equations: one before scaling:

F * d = mgh (Leg force * leg movement = mass * gravity * jump height)

and

F * d / k^3 = m * g * h' / k^3

Which means that, to first order approximations jump height is independent of
scale (h - h') and you should easily be able to jump out of the blender.

~~~
psykotic
Your conclusion is right but your argument appears to be lacking.

> You integrate this over the path that your center of mass takes, which is
> going to change linearly with your scale k (d).

But if that's how you define d, then it is the height h! Here you are assuming
that d scales linearly with k. Later you are saying that h is invariant with
respect to k. Which is it?

Jumping is impulsive, not sustained, so your force times distance formulation
doesn't seem appropriate.

Thompson has a nice analysis in his classic treatise On Growth and Form, which
is all about dimensional analysis applied to biology. Here is the relevant
excerpt:

[http://books.google.com/books?id=8FrORfyp7bsC&pg=PA36#v=...](http://books.google.com/books?id=8FrORfyp7bsC&pg=PA36#v=onepage&q&f=false)

~~~
robobenjie
I think I wasn't quite clear in what I meant. d is the distance that your
center of mass changes while your feet are in contact with the ground (While
you are doing work) and h is the height that your center of mass changes while
you are in the air.

Saying a force is impulsive means that you making certain assumptions to make
your calculation easier. It doesn't change the fact that W = integral of force
dotted with displacement. It is true that I am making a big approximation
where I say that the force is constant over the jump, making the integral
evaluate to f * x.

Thanks for the link. I think this kind of stuff is very interesting.

