
Algorithms in a nutshell
by George T. Heineman · first published 2008
23mentions
12recommended by
21HN commenters
2009–2024first – last mentioned
57% recommend38% neutral5% critical
Why HN recommends it
Compact, approachable algorithms book focused on application over theory, with complete implementations. Suits self-taught programmers and non-CS people wanting a practical reference and quick interview prep.
Summarised by Claude from recommending comments
This book provides efficient code solutions in several programming languages that you can easily adapt to a specific project. Each major algorithm is presented in the style of a design pattern that includes information to help you understand why and when the algorithm is appropriate--
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








I would also recommend Roughgarden's Coursera classes, however, I would strongly recommend waiting for a live session. A book I think is informative from a practical perspective is Algorithms in a Nutshell from O'Reilly Press. As always with Amazon I would look for a used copy.
on “How can I learn algorithm from scratch” ↗…in a full time position. Just like you, I wanted to continue my learning and get more knowledge on algorithms, data-structures, and other things DevBootcamp doesn't teach you. I strongly recommend - Algorithms in a nutshell from O'Reilly (http://www.amazon.com/Algorithms-Nutshell-In-OReilly/dp/0596...) and - Cracking the Coding interview (http://www.amazon.com/Cracking-Coding-Interview-Programming-...) Those two books…
on “Ask HN: How to best acquire theoretical computer science knowledge?” ↗Just a note I thought might be useful. I am a self-taught programmer as well and personally, I found the O'reilly 'Algorithms in a nutshell'[1] book excellent as both a learning resource as well as reference. Also, it is a /much/ smaller book with a '...focus on application, rather than theory...' and /complete/ working code. [1] http://www.amazon.com/Algorithms-Nutshell-In-OReilly/dp/0596...
on “Algorithms on Khan Academy – a collaboration with Dartmouth College professors” ↗Or you could read the good old Algorithms in a Nutshell. (Bubble sort is not in the book, though.)
on “Let's Learn Algorithms: An Intro to Bubble Sort” ↗Algorithms in a nutshell by George T. Heineman helped me a lot. It's not too dense so it's easy to read, just enough to learn and understand how an algorithm works.
on “Ask HN: Looking for a book on algorithms and data structures” ↗…non-CS major and am much unlike many of you mathematical whiz kids who make up this board, so having stated that, I hope you'll get a better idea for why this book I just checked out at the library, Algorithms in a Nutshell [http://oreilly.com/catalog/9780596516246/], gets me so hot. To me algorithms are as interesting as the formulas that makeup our Universe brought to us from physicists, granted they're both inspired…
on “Ask HN: What is the big idea with algorithms?” ↗…sense—of data from you: did you find the trick or not? I don't think you have to be unusually good at algorithms. I basically read some Wikipedia articles and spent a few hours in the hotel cramming Algorithms in a Nutshell, and I managed to squeak through. That time was incredibly well-spent. Since then, I have relied on that algorithm knowledge way more than I expected too, and have since spent more time learning algorithms…
on “Why I Don’t Talk to Google Recruiters” ↗…likely think it's a cursory overview), but I think for everyone else it's a computer science degree in a book you can read in one or two weeks. At least half the degree. For the second half, I recommend Algorithms In A Nutshell. And done! Go back to programming your high level JavaScript react app and get on with your life. On a side note: it's my opinion that theory first is the wrong way. Application first, theory as needed…
on “Ask HN: What's the best computer science book you've read recently?” ↗…up a tree balancing routine on a whiteboard on command? No! But, I'm aware that such algorithms exist and what situation I'd need to apply them to. I think this is what you should shoot for. As for Algorithms in a Nutshell, if it is the book I'm thinking of then bravo. I like how the authors chose to present the algorithms using code and not the awful psuedo-code found in most algorithms texts.
on “Ask HN: What is the big idea with algorithms?” ↗I'm self taught :) Algorithms in a Nutshell does a great job of introducing data structures and algorithms. It's also very short. Data structures and particularly basic graph algorithms (DFS, BFS, DSP) are very powerful and can solve a lot of…
on “What should a self-taught programmer study?” ↗Here's my list: Structure & Interpretation of Computer Programs (Abelman, Sussman - Lisp oriented, classic) Algorithms in a Nutshell (OReilly) Clever Algorithms (Jason Brownlee. Uses Ruby for examples) Data Mining Analysis - Fundamental Algorithms (Mo. Zaki - ebook) Python for Data Analysis (Wes McKinney) Mining of Massive Datasets…
on “Good ebook for learning data structures & algorithm” ↗…but they helped me to understand Algorithms and I really love them now, it is so interesting. Intro to Algorithms, it was pretty tough at times but I really liked it. The Algorithm design manual. Algorithms in a nutshell. I also was taking a course at Temple which helped but I really liked reading about them, than I thought a lot about the algorithm. I also have a lot of Data Structures books to go along with the Algorithm…
on “How can I learn algorithm from scratch” ↗It's a bit light, but in college, I was a fan of Algorithms in a Nutshell (O'Reilly). http://amzn.com/059651624X
on “Top Books on Amazon Based on Links in Hacker News Comments” ↗Algorithms in a Nutshell. Massive bang for the buck and very approachable. Get a book on Discrete Mathematics for set theory, combinatorial etc. For understanding how computers actually work, I learned to code on a 6510 so that…
on “Ask HN: Book recommendations for CS fundamentals for a self-taught programmer?” ↗I'm planning to spend the next few weeks beefing up on algorithms - starting with Algorithms in a Nutshell, followed by Algorithm Design Manual and Algorithms by Dasgupta. Before I start these books, I wanted a primer on the math behind algorithms. A friend suggested I look at Velleman's "How to Prove It".…
on “Ask HN: Math behind Algorithms” ↗