A brush-up on algorithms...
June 6, 2007 1:01 PM   Subscribe

Imagine: You have an upcoming interview that will be heavily focused on algorithms (specifically computer language related but not a specific language). What resources would you turn to?
posted by purephase to Computers & Internet (12 answers total) 14 users marked this as a favorite
 
http://en.wikipedia.org/wiki/List_of_algorithms
posted by StarForce5 at 1:07 PM on June 6, 2007


Knuth's The Art of Computer Programming.
Introduction to Algorithms by Cormen, Leiserson and Rivest.
Artificial Intelligence: A Modern Approach by Russell and Norvig

(Algorithm Design by Kleinberg and Tardos may be easier to understand than Cormen, Leiserson and Rivest, although they both cover much of the same material)
posted by needled at 1:16 PM on June 6, 2007


Skiena's "Algorithm Design Manual" is a good resource for bridging the gap between algorithm theory and practical implementation. It contains a lot of examples of how understanding something theoretical or abstract can help in concrete situations.
posted by Jabberwocky at 1:24 PM on June 6, 2007


When I interviewed a few months ago I pulled out Cormen, Leiserson and Rivest (linked above) which I hadn't read since college. It's a great book that covers a ton of algorithms and I highly recommend it.
posted by atomly at 2:13 PM on June 6, 2007


"Knuth's The Art of Computer Programming."

That's a fantastic resource, but I don't see anyone cramming for an exam or interview making good use of it, owing to its density and heft.
posted by i_am_joe's_spleen at 3:17 PM on June 6, 2007


Programming Interviews Exposed if this is a first-job-out-of-college situation or similar - basically an entry-level programming interview. It deals with a lot of standard CS interview questions and good ways to approach them. If you have three hours between picking up the book and starting your interview, it's not a bad choice since in a full day of interviews at Google, Microsoft, or NVidia you'll likely see at least one question from it. I've interviewed at all three, and I'm not exaggerating. Read it on the plane.

If you've got more time I'd use something a little more cerebral such as Knuth or CLRS, or Kleinberg & Tardos. It also doesn't hurt to look through Kernighan & Ritchie and Kernighan & Pike, which will both give you a lot of good examples of coding questions since a lot of people like to ask lower-level sort of things that many modern coders don't deal with on a daily basis, to separate the men from the boys. I've also seen some questions taken from Programming Pearls.

Caveat emptor: I do terribly in algorithms interviews. I think this is due to nerves, fear, etc rather than my study materials, but I've used most of these resources at least a little and they have not generally helped me. However, they did give me the sense that if I weren't a quivering mass of idiot goo during interviews, their content would be extremely valuable.
posted by crinklebat at 3:31 PM on June 6, 2007


Kreher/Stinson Combinatorial Algorithms (Generation, Enumeration, and Search) is good - pithy, to the point, easy to read. There's the Stony Brook Algorithm Repository, which can also lead you Wilf's Combinatorial Algorithms book which is good despite it's antique appearance, and is a free PDF download. These will broaden your horizons a bit beyond the usual bubble sort / merge sort / binary search / minimal spanning tree stuff.
posted by Wolfdog at 3:34 PM on June 6, 2007 [1 favorite]


Knuth
Algorithms by Robert Sedgwick
posted by Dub at 4:50 PM on June 6, 2007


Hacker's Delight.
posted by scalefree at 4:58 PM on June 6, 2007 [1 favorite]


I've found that Algorithm Design by Goodrich and Tamassia is far more cram-friendly than CLRS.
posted by thisjax at 5:23 PM on June 6, 2007


Depending on your learning style and the interview, your mileage with this may vary.

I'd pick an algorithm I'd at least heard of, look up the Wikipedia article on it, and then tree-browse everything that links from it. Pay attention to the implementations, but spend more time figuring out how to build solutions to problems out of these building blocks. They're not likely to ask you to implement quicksort (although they might), but rather to solve a slightly higher-level problem. Being able to provide an algorithm-centric solution to the problem, even if it's only "I'd put them in a digraph, and then use a topological sort", seems like a better bet than hoping to cram the implementation of the precise algorithm they coincidentally ask for.
posted by Netzapper at 5:44 PM on June 6, 2007


Hacker's Delight is an excellently enjoyable book but I wouldn't recommend it for answering interview questions unless you're writing 1980s video games or a compiler backend.
posted by hattifattener at 1:03 AM on June 7, 2007


« Older Seeking a certain "pen is mightier" clip art piece...   |   What can we rumba to? Newer »
This thread is closed to new comments.