Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: good, quick algorithms course to prepare for big tech interviews?
143 points by zxcvvcxz on Sept 19, 2011 | hide | past | favorite | 27 comments
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?


Programming Interviews Exposed is great: http://www.amazon.com/Programming-Interviews-Exposed-Secrets...

http://www.careercup.com/ is also helpful.

Lastly you can look around http://programmers.stackexchange.com

The fifth edition of Cracking the Coding Interview came out a few weeks ago. The correct link is http://www.amazon.com/dp/1466208686.

I think second link (Skiena) is the same as first one.

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.

If you have time, get Programming Pearls by Jon Bentley (http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/...)

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)

Although a great book, I don't think there is enough material covered to prepare one for a tech interview.


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.

There is a GRE Subject Test for Computer Science that covers broad set of questions:


You can use this as your guidance.

Here is a practice test that you can look into. It has some questions on algorithms: http://www.ets.org/Media/Tests/GRE/pdf/CompSci.pdf

For out of college candidates you have two dominant types of problems: algorithms, and data-structures.

http://www.cs.berkeley.edu/~jrs/170/ http://webcast.berkeley.edu/playlist#c,d,Computer_Science,63...

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...):


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.

I have just started reading the bible of algorithms:


Not a quick win but a comprehensive, in-depth algorithm book :-)

I've heard good things about that book, but to be fair The Bible Of Algorithms can only be Knuth's TAoCP.

The bible is definitely TAoCP, but its a little long to read before an interview, maybe select sections.

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.

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.

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.

If you have time you can practice at http://www.topcoder.com or also http://projecteuler.net/

I heard good things about "Algorithms For Interviews" by Adnan Aziz and Amit Prakash - http://www.amazon.com/Algorithms-Interviews-Adnan-Aziz/dp/14... (about $20)

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.

Agreed! The Links are great!

I like the Algorithm Design Manual by Skiena

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact