4 ms·
Ask HN: Recommendations for a book about algorithms and data structures?
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
- atmosx 11y agoHm, 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 11y agoI 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-Algorithms/dp/0201896834/ref=sr_1_2?s=books&ie=UTF8&qid=1444594221&sr=1-2&keywords=the+art+of+computer+programming http://www.amazon.co.uk/Art-Computer-Programming-Fundamental... part 1 or is this: 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 http://www.amazon.co.uk/Computer-Programming-Fascicle-MMIX-M...
- dwarman 11y agoYou'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.
- oddbear 11y agoI 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 11y ago+1 for mentioning entry level book. Can anyone comment about quality?
- cristaloleg 11y agoAlgorithms [Dasgupta, Papadimitriou, Vazirani] (2008) Algorithm Design [Kleinberg, Tardos] (2005)
- aditya 11y agoCLR is probably the easiest to get started with: http://www.amazon.com/Introduction-Algorithms-Edition-Thomas-Cormen/dp/0262033844 http://www.amazon.com/Introduction-Algorithms-Edition-Thomas...
- caioc 11y agoVery specific to OOP : "Design Patterns: Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides
- mherrmann 11y agoGreat book, but as you said very OOP specific. It has no contents on big-O complexity and very little on algorithms.
- brudgers 11y agoThe Art of Computer Programming It also contains instructive exercises and answers.
- DanBC 11y agoHow 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
- ystad 11y agoThe Algorithm Design Manual by Stephen Skiena http://www.algorist.com/ http://www.algorist.com/
- charlieegan3 11y agoThis was one of our course textbooks - it's got good exercises and most of the answers are available online.
- mherrmann 11y agoI second that. It's what Google recommend (among other things) to prepare for an interview.
- dyoo1979 11y agoHyperlink to the recommendation: https://www.google.com/about/careers/students/guide-to-technical-development.html https://www.google.com/about/careers/students/guide-to-techn... It's under the "Develop a strong understanding of algorithms and data structures" part.
- eecks 11y agoCool, I got the pdf version. Is this legit available for free? I just found it as the first link on Google
- tk120404 11y agohttp://visualgo.net/ http://visualgo.net/
- bordercases 11y agoLook 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.