Live data from Hacker News

My Job Interview at Google

catonmat.net

41–50 of 114 posts

Re: My Job Interview at Google

#41

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

[deleted]

Re: My Job Interview at Google

#42
Isn't this level of interviewing kind of excessive and time-expensive? If I were Google, I would do the following:

1) Have the first interviewer be the best/most-appropriate interviewer for the position (manager, lead dev, whatever). Have them write down in a sealed envelope a "hire" or "no hire" statement after the interview.

2) At the end of the assorted interviews, measure how often the first interviewer is correct in his hire/no hire assessment.

My theory is that interviewing is a great opportunity for "thin-slicing" (a la Blink) and that you'd get 98% of the value with 10% of the time invested.

Related anecdote (from gladwell dot com):

One of the stories I tell in "Blink" is about the Emergency Room doctors at Cook County Hospital in Chicago. That's the big public hospital in Chicago, and a few years ago they changed the way they diagnosed heart attacks. They instructed their doctors to gather less information on their patients: they encouraged them to zero in on just a few critical pieces of information about patients suffering from chest pain--like blood pressure and the ECG--while ignoring everything else, like the patient's age and weight and medical history. And what happened? Cook County is now one of the best places in the United States at diagnosing chest pain.

Not surprisingly, it was really hard to convince the physicians at Cook County to go along with the plan, because, like all of us, they were committed to the idea that more information is always better. But I describe lots of cases in "Blink" where that simply isn't true. There's a wonderful phrase in psychology--"the power of thin slicing"--which says that as human beings we are capable of making sense of situations based on the thinnest slice of experience. I have an entire chapter in "Blink" on how unbelievably powerful our thin-slicing skills are. I have to say that I still find some of the examples in that chapter hard to believe.

Re: My Job Interview at Google

#43
post #8
post #4

Earlier quoted context omitted.

So why do you think you didn't get the job?

This is probably just interview #9 - seeing if he'll break NDA or trash talk Google after finding out he didn't get the job. You have to know how your employees will handle stress and frustration. ;)

"I got the green light from Google to publish this article"

Re: My Job Interview at Google

#44

"The questions were about Linux systems administration, algorithms, computer architecture and C programming." Couldn't you just Google for the answers to these questions in order to bring yourself up to speed where necessary? I'm not sure I see the value in trying to keep vast libraries of arcana in your head at all times.

Part of the interview is an intelligence/memory/experience test. They don't want to use rigid requirements ("must absolutely have five years experience") and it would probably be illegal to administer an IQ test (and the sort of intelligence IQ measures isn't always the same as the sort of intelligence needed for the job).

In addition their culture seems to be that once you're on the job (as a salaried employee vs. a contractor) they'll do all in their powers to ensure you aren't laid off, get fired or quit out of boredom: you can freely move from team to team, you generally work flexible hours and with little micro management. The tough hiring (with far too many false negatives but no false positive) requirement is why they're able to mantain such a culture.

Re: My Job Interview at Google

#45

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

[deleted]

Re: My Job Interview at Google

#47

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

I originally thought (f-1)6/4+1 = (f-1)3/2+1, but it's an integer... hmmm

gonna have to think about that some more

Re: My Job Interview at Google

#48
post #39

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

The elegant solution escapes me for now, but you could treat the odds and evens from the 1-5 function as a biased bit stream, apply a von Neumann corrector and then use the resulting stream.

Now I remember why we computer scientists always looked up to the Math majors...

Re: My Job Interview at Google

#49

Isn't this level of interviewing kind of excessive and time-expensive? If I were Google, I would do the following: 1) Have the first interviewer be the best/most-appropriate interviewer for the position (manager, lead dev, whatever). Have them write down in a sealed envelope a "hire" or "no hire" statement after the interview. 2) At the end of the assorted interviews, measure how often the first interviewer is correc…

I think people can be convinced of this by explaining this is a signal to noise ratio problem. If we have a lot of sources of information but if a lot of them have a lot of noise, it's useless.

Re: My Job Interview at Google

#50

Could anyone point me on how to solve this(either a solution or preferrably a pointer on how to get to it): "Q: Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7." First I thought it was simple but the I got stuck, maybe I'm just tired. No matter how I twsit and turn it I seem to get only an even distribution over 5 numbers.

int rand17() { int t = rand15();

  if(t > 3)
      return t;
  else
      return 2 + rand15();
}

I dunno? will that work?

Post reply on HN