Ask HN: Recommendations for a book about algorithms and data structures?
18 comments
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.
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.
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:
[1] http://www-cs-faculty.stanford.edu/~uno/taocp.html
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...
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.
Fascicles is a new effort by Knuth and is more hardware oriented.
Algorithms [Dasgupta, Papadimitriou, Vazirani] (2008)
Algorithm Design [Kleinberg, Tardos] (2005)
Algorithm Design [Kleinberg, Tardos] (2005)
CLR is probably the easiest to get started with:
http://www.amazon.com/Introduction-Algorithms-Edition-Thomas...
The Art of Computer Programming
It also contains instructive exercises and answers.
It also contains instructive exercises and answers.
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
The Algorithm Design Manual by Stephen Skiena
http://www.algorist.com/
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
I second that. It's what Google recommend (among other things) to prepare for an interview.
Hyperlink to the recommendation: https://www.google.com/about/careers/students/guide-to-techn...
It's under the "Develop a strong understanding of algorithms and data structures" part.
It's under the "Develop a strong understanding of algorithms and data structures" part.
* Explanation
* Code examples
* History (when/who first used it)
* Application examples