I've interviewed with Google, Apple, and Microsoft. It always strikes me that the questions they ask you during interviews are not at all representative of what you need to be able to do on the job. That's why these course materials are <i>incredibly</i> valuable.<p>You have a better shot at these types of interviews coming straight out of college than you do after X years of job experience. The interviewing mindset is very different from the working mindset. If you want to do well, you should study these PDFs for a few weeks (repetition is the mother of learning) before your interviews. I did exactly that before my last round of interviews, and it made a huge difference.<p>I didn't post them on HN because, honestly, I don't want them to be too publicized. These are the <i>exact</i> questions that you will be asked at these types of interviews. It's borderline cheating.
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.<p>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.<p>At one point when I started working on the "better answer" straight after a "good answer", the interviewer asked me why. I confessed that it looked to be a similar class of problem to one in the previous interview, and he told me that was excellent.<p>There were two problems I did badly at. One was a math question (number theory), which I got after a bit of work. The other didn't really get anywhere with. It wasn't included in any of these linked items, either, so I guess I can't say much more about it. It was a fair question though.
I realize the notes are for preparing a potential employee for a Google-style job interview.<p>I am curious if there are any employers out there with tips for follow employers about how to screen candidates.<p>I find that a vital skill is understanding good code design, that is, placing the responsibilities with the correct code, keeping dependencies down to a minimum, proper encapsulation of the complex stuff, separation of concerns, etc.<p>I recently hired someone who is a decent coder and problem solver, but I regularly have to “correct him” when he starts new submodules because he still doesn’t master the “design” aspect of coding.<p>That is, he might do some rudimental analysis about how to structure things and what the API should be, but if I don’t stop him, it always ends up being more complex than need be, and I honestly don’t think he knows how he could do it better, because it is really the same things I say to him over and over.<p>Since I will hire more people down the road and since I am tired of having to point out the same design flaws over and over, I am interested in tips for “testing peoples design skills” and also book recommendations about how to master big software projects without it ending up as tightly coupled components with arcane code — which sadly seems to be how most projects do end up…
Also check <a href="http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html" rel="nofollow">http://steve-yegge.blogspot.com/2008/03/get-that-job-at-goog...</a>
The <i>article</i> 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?
Um. Just had a look at Common Questions Part 1 (<a href="http://courses.csail.mit.edu/iap/interview/Hacking_a_Google_Interview_Practice_Questions_Person_A.pdf" rel="nofollow">http://courses.csail.mit.edu/iap/interview/Hacking_a_Google_...</a>), and the first question is about substring matching.<p>Instead of giving a Boyer-Moore style solution (with sub-linear complexity), it gives the naive approach (with quadratic complexity).
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.<p>Any definition of polymorphism should at least mention something about the method that is invoked depends on runtime data, and is not resolved (or known) at compile time.
They seem to get finding the median slightly wrong:<p>"Note that finding the median of an array is a special case of this where k = n/2."<p>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.)
Most companies blacklist interview questions that are highly publicized. Maybe companies should also ask if you've read questions online before an interview begins. :)