Ask HN: good, quick algorithms course to prepare for big tech interviews?

143 points by zxcvvcxz ↗ HN
I'm going to be interviewing for a professional work experience year as a university student (engineering) at several big software tech companies. I studied mainly electrical engineering, and it's been a while since my computer science algorithms days. I've still coded pretty much every week, but I can't remember specific stuff like merge sort, binary heaps, etc (plus I don't know what I need to know).

I hear algorithms-type questions come up a lot, so I would like to prepare really well as quickly as I can. What good sources would HN recommend?

Thanks.

28 comments

[ 4.4 ms ] story [ 72.2 ms ] thread
If you have time, get Programming Pearls by Jon Bentley (http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/...)
Although a great book, I don't think there is enough material covered to prepare one for a tech interview.
This isn't the only prep that you'd need, but this is a good one to get your mind in the right place.

(I've given ~2 "big tech" interviews a week pretty solid for the past 6 years)

In terms of ways to exercise your knowledge, go through old ACM Programming Competition questions too. They'll most likely be harder than you'll get in a phone or whiteboard, but it gets you in the mode of thinking for it (finding the fastest solution, smallest space, etc...):

http://www.ntnu.edu.tw/acm/ProblemSetArchive.html

Also, poke around GlassDoor (http://www.glassdoor.com). There's "interview reviews" up on there, and for larger companies, a lot of times there's just straight up questions and answers. So that can give you a good feel of who's asking what level of stuff. It's somewhat grain of saltish since a lot of the reviews seem to end with "no offer given", but it's still interesting.

If you can't remember merge sort, quick sort or heaps, a easy starting point is wikipedia, and then code them up in your language of choice. It shouldn't take long, and you'll learn it better by doing than by reading about it.
I think second link (Skiena) is the same as first one.
(comment deleted)
Judging by your choice of word, I think you might be a University of Toronto student. If you're a University of Toronto student doing the PEY program, then the tech interview for the big companies should be pretty easy. I think the hardest they managed to throw when I was doing interviews for PEY was how to reverse a string in Java.

If you're aiming for smaller companies or startups, they actually have harder technical questions.

Also, don't skimp on the preparation for the non-technical part of the interview. Prepare to answer soft questions (e.g. your previous team work experience, etc), practice talking about your past project experiences, practice making eye contacts and sounding confident, etc.

http://openclassroom.stanford.edu/MainFolder/CoursePage.php?...

This course is CS 161 at Stanford: Intro to Algorithms. It's got a lot of short videos, so you can pick which ones you wanna watch. Also, I took the class, the prof is really good.

Thanks a lot for posting this. I love that the lectures are broken up into smaller chunks, it makes the whole subject much easier to watch.
I like the Algorithm Design Manual by Skiena
I would highly recommend reading Programming Pearls by John Bentley. It is an eye opener and gives you too the point tricks to solve problems that companies generally ask.

http://cm.bell-labs.com/cm/cs/pearls/ They have a book too.

Also, there is careercup.com. Fantastic site if you want to get a feel of what sort of questions are asked in different companies.

You might want to try http://www.spoj.pl/ - there's a repository of algorithmic puzzles and you can submit your solutions in a number of programming languages.
For a concise, very readable book that I've used to get myself up to speed with algorithms in preparation for interviews you can try reading Algorithms by Papadimitrou, Dasgupta, Vazirani. You can grab a pdf at [Papadimitrou's website][1].

[1]: http://www.cs.berkeley.edu/~vazirani/algorithms.html

This is the book used for an Algorithms Analysis class at my university (Brigham Young University), and I have been very impressed so far with it. The fact that it is available for free is a great plus as well.