
Ask HN: Recommendations for a book about algorithms and data structures? - eecks
Is there any book that acts as a reference book for algorithms and&#x2F;or data structures that have the following:<p>* Explanation<p>* Code examples<p>* History (when&#x2F;who first used it)<p>* Application examples
======
atmosx
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](http://www-cs-
faculty.stanford.edu/~uno/taocp.html)

~~~
eecks
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...](http://www.amazon.co.uk/Art-Computer-Programming-Fundamental-
Algorithms/dp/0201896834/ref=sr_1_2?s=books&ie=UTF8&qid=1444594221&sr=1-2&keywords=the+art+of+computer+programming)

part 1 or is this:

[http://www.amazon.co.uk/Computer-Programming-Fascicle-
MMIX-M...](http://www.amazon.co.uk/Computer-Programming-Fascicle-MMIX-
Millennium/dp/0201853922/ref=sr_1_4?s=books&ie=UTF8&qid=1444594221&sr=1-4&keywords=the+art+of+computer+programming)

~~~
dwarman
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.

------
ystad
The Algorithm Design Manual by Stephen Skiena

[http://www.algorist.com/](http://www.algorist.com/)

~~~
mherrmann
I second that. It's what Google recommend (among other things) to prepare for
an interview.

~~~
dyoo1979
Hyperlink to the recommendation:
[https://www.google.com/about/careers/students/guide-to-
techn...](https://www.google.com/about/careers/students/guide-to-technical-
development.html)

It's under the "Develop a strong understanding of algorithms and data
structures" part.

------
bordercases
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.

------
cristaloleg
Algorithms [Dasgupta, Papadimitriou, Vazirani] (2008)

Algorithm Design [Kleinberg, Tardos] (2005)

------
oddbear
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.

~~~
suryon
+1 for mentioning entry level book. Can anyone comment about quality?

------
aditya
CLR is probably the easiest to get started with:
[http://www.amazon.com/Introduction-Algorithms-Edition-
Thomas...](http://www.amazon.com/Introduction-Algorithms-Edition-Thomas-
Cormen/dp/0262033844)

------
DanBC
How to Solve it by Computer was popular (probably still is in some places) but
uses Pascal.

[https://en.wikipedia.org/wiki/How_to_Solve_it_by_Computer](https://en.wikipedia.org/wiki/How_to_Solve_it_by_Computer)

------
brudgers
_The Art of Computer Programming_

It also contains instructive exercises and answers.

------
tk120404
[http://visualgo.net/](http://visualgo.net/)

------
caioc
Very specific to OOP : "Design Patterns: Elements of Reusable Object-Oriented
Software" by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides

~~~
mherrmann
Great book, but as you said very OOP specific. It has no contents on big-O
complexity and very little on algorithms.

