Live data from Hacker News

Hacking a Google Interview - MIT's guide to Google interviews

courses.csail.mit.edu

31–40 of 43 posts

Re: Hacking a Google Interview - MIT's guide to Google interviews

#31
They seem to get finding the median slightly wrong:

"Note that finding the median of an array is a special case of this where k = n/2."

I'm pretty sure it should be k = (n+1) / 2. (If there are 5 numbers, you want the 3rd one, if there are 6 numbers you want the average of 3 and 4.)

Re: Hacking a Google Interview - MIT's guide to Google interviews

#32
post #27

I have actually tried but could not find any scientific evidence that these type of technical interviews actually result in the best hiring decisions.

It would surprise me if there was any scientific evidence of this kind. This would be incredibly difficult to measure, control for other variables, arrange for a sizable sample, etc.

Re: Hacking a Google Interview - MIT's guide to Google interviews

#33
post #27

I have actually tried but could not find any scientific evidence that these type of technical interviews actually result in the best hiring decisions.

When I worked at Amazon.com they did analyze interviewing techniques, and I assume Google and other large companies do too. They didn't do controlled scientific experiments (as far as I know), but they looked at things like which phone screen questions were correlated with success in later on-site interviews, and did post-mortems of "wrong" interviewing decisions ("no" votes on someone who was eventually hired and successful, or "yes" votes on someone later found to be unsuitable). The data that comes out of this is not exactly scientific, but it does represent lessons learned from experience. [For what it's worth, a typical Amazon interview is a lot like a typical Google interview.]

Re: Hacking a Google Interview - MIT's guide to Google interviews

#34
post #31

They seem to get finding the median slightly wrong: "Note that finding the median of an array is a special case of this where k = n/2." I'm pretty sure it should be k = (n+1) / 2. (If there are 5 numbers, you want the 3rd one, if there are 6 numbers you want the average of 3 and 4.)

k = n/2 is correct when you are dealing with zero-indexed arrays.

For arrays whose length is even, I think it's also acceptable to take either one of the two values (instead of the mean of the two) as the median value. Wikipedia is fairly ambiguous on this as it only states "one often takes the mean" and "sometimes one takes the average of the two median numbers".

I believe that for a large enough sample size the discrepancy shouldn't even matter all that much.

Re: Hacking a Google Interview - MIT's guide to Google interviews

#35
post #2

I've done the Google interview thing (had 5 interviews, got asked to do more, declined due to my wife taking another job), and I can confirm I had some (I think 4 or 5) of these questions. In my interviews I generally started with a naive answer, got the good answer on my own and got to the best answer with some hints from the interviewer. They didn't seem to regard this as a bad thing. At one point when I started wo…

Can I ask what interview stage you were asked these in, and what level the position was for?

While these are good questions, in my experience they're so widely known from books/websites that I'd be amazed if a company like Google was using them for anything other than early screening of candidates.

Re: Hacking a Google Interview - MIT's guide to Google interviews

#36
post #3

They get the definition of polymorphism wrong, because their definition ("ability of one method to have different behavior depending on the type of object it is being called on / object passed by parameter) is also met by compile time function overloading. Their example, where you have a customer integer class that is capable of dealing with both other integer arguments and floats is pretty poor. Any definition of po…

> They get the definition of polymorphism wrong, because their definition ... is also met by compile time function overloading.

That doesn't make the definition incorrect; there are many types of polymorphism.

Function overloading is an example of ad-hoc polymorphism; generics is an example of parametric polymorphism; and inheritance is an example of inclusion polymorphism.

Re: Hacking a Google Interview - MIT's guide to Google interviews

#37
post #19

The article is totally fine for HN. However, I don't think it's "hacking" a test if I study for it, so why "Hacking a Google Interview"? Is "hack" the new "pwn" or something?

The "hacking" aspect is that during the interview instead of mentioning you've heard the problem before you're supposed to pretend you're a genius who solved the problem on the spot.

Actually I think that advice is misguided, as in my experience when you tell an interviewer you're already familiar with their favorite brainteaser they're just as impressed as if you solved it yourself, and you don't feel dishonest.

Re: Hacking a Google Interview - MIT's guide to Google interviews

#38
Um. Just had a look at Common Questions Part 1 (http://courses.csail.mit.edu/iap/interview/Hacking_a_Google_...), and the first question is about substring matching.

Instead of giving a Boyer-Moore style solution (with sub-linear complexity), it gives the naive approach (with quadratic complexity).

Re: Hacking a Google Interview - MIT's guide to Google interviews

#39
post #35
post #2

I've done the Google interview thing (had 5 interviews, got asked to do more, declined due to my wife taking another job), and I can confirm I had some (I think 4 or 5) of these questions. In my interviews I generally started with a naive answer, got the good answer on my own and got to the best answer with some hints from the interviewer. They didn't seem to regard this as a bad thing. At one point when I started wo…

Can I ask what interview stage you were asked these in, and what level the position was for? While these are good questions, in my experience they're so widely known from books/websites that I'd be amazed if a company like Google was using them for anything other than early screening of candidates.

I did the phone screen, plus on-site interviews. It was for a developer position - I've got 10 years experience.

I was going for an overseas position, which complicated the process, because they had to fly me to another city for a combination of onsite and video interviews.

Obviously they asked other questions, too.

My impression was that they hadn't planned on doing another round of interviews, but the mixed feed back I got confused them (I did very well on at least on question, but totally bombed on another). Who knows, though - the whole interviewing process was a bit of a mess to be honest.

Post reply on HN