Ask HN: Recommendations for a book about algorithms and data structures?

20 points by eecks ↗ HN
Is there any book that acts as a reference book for algorithms and/or data structures that have the following:

* Explanation

* Code examples

* History (when/who first used it)

* Application examples

18 comments

[ 2.1 ms ] story [ 60.0 ms ] thread
Hm, is history important? There's wikipedia if you're interested in the 'history' of a specific algorithm. For the rest, most books I've seen have pseudo-code, which is easy to translate to code.

The classic textbooks are:

  * "Algorithms" by Robert Sedgewick et al.
  * "Introduction to Algorithms" by Cormen et al.
If you're extremely serious about algorithms, you might wanna go directly with the bible: TAOCP[1].

[1] http://www-cs-faculty.stanford.edu/~uno/taocp.html

I would love to go with The Art of Computer Programming.. but I am already confused reading that page. Is this:

http://www.amazon.co.uk/Art-Computer-Programming-Fundamental...

part 1 or is this:

http://www.amazon.co.uk/Computer-Programming-Fascicle-MMIX-M...

You'll be wanting the first one, volume 1, and also Volume 2 for data structures. These are classics, still relevant, and will give you a good grounding to pursue the more recent offerings suggested by other answerers here.

Fascicles is a new effort by Knuth and is more hardware oriented.

I like Grokking Algorithms (pdf only, book done in december). It's quite easy to understand and start with, compared to other algorithms books I have seen.
+1 for mentioning entry level book. Can anyone comment about quality?
Algorithms [Dasgupta, Papadimitriou, Vazirani] (2008)

Algorithm Design [Kleinberg, Tardos] (2005)

Very specific to OOP : "Design Patterns: Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides
Great book, but as you said very OOP specific. It has no contents on big-O complexity and very little on algorithms.
The Art of Computer Programming

It also contains instructive exercises and answers.

The Algorithm Design Manual by Stephen Skiena

http://www.algorist.com/

This was one of our course textbooks - it's got good exercises and most of the answers are available online.
Cool, I got the pdf version. Is this legit available for free? I just found it as the first link on Google
Look up "Introduction to Algorithms: A Creative Approach" by Manber and "Algorithm Design Manual" by Skiena.

The former has the best exercises (borderline mathematical), but is lightest on implementation. The latter has the best introductory pedagogy and has implementation code, but is not what I would use if I want to grok algorithms deeply.

People keep recommending Cormen. He's the book you get AFTER you understand algorithms. Cormen reads more like a reference manual. Cormen can substitute in for Skiena in a pinch. Skiena sounds like the one you want most of all though.