Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Which book would you recommend for algorithms and data structures instead?


I've used Algorithms by S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani for the course they teach at Berkeley and didn't like it at all. I'm a pretty big fan of Algorithms by Sedgewick. There is a class on Cousera is also taught by Sedgewick and uses the book. The first half of the book follows a traditional data structures course and the second half a traditional algorithms course.

Some people might find it as a downside but the book was written with Java in mind. I personally didn't mind this at all.

http://www.amazon.com/Algorithms-4th-Edition-Robert-Sedgewic...


As often as this gets recommended, I'd go with Introduction to Algorithms (CLRS)[1]. I'm currently in the process of going through it on my own as I'm taking a semester off, and I find it perfect to study from. It goes in depth, explaining the math behind run times (which some may like about it, while other might not), and it covers a lot of ground. I haven't fully finished it, and I'm only on chapter 6, but so far it's one of my favourite textbooks to study from.

[1] http://www.amazon.com/Introduction-Algorithms-Thomas-H-Corme...


Skiena's Algorithm Design Manual and Kleinberg and Tardos' Algorithm Design are both very nice books. CLRS is very nice, and depending on your personal ethics the Solutions manual for the 2nd edition is pretty easily obtainable online, which might be useful for that despicable and highly discouraged activity known as self-study. Sedgwick's stuff is not bad.

I used Aho, Hopcroft, and Ullman's two Algorithms books in class. They are old but extremely good. If you want to buy dead tree books they're available used for a very low price.

Hope that helps.


So... recommendations for all the major books.


I can go into the strengths and weaknesses of each (I'm kind of a packrat...) but you haven't said anything about yourself or what you're looking for. If you really don't know what you're looking for you should just do what the majority of people here would tell you to do and get CLRS. It's not an accident that these are popular textbooks or that CLRS is the most popular.

(I didn't really mean to recommend Sedgwick's stuff. As I said, I just think it's not bad.)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: