Jump to ratings and reviews
Rate this book

Algorithms in a Nutshell

Rate this book
Creating robust software requires the use of efficient algorithms, but programmers seldom think about them until a problem occurs. Algorithms in a Nutshell describes a large number of existing algorithms for solving a variety of problems, and helps you select and implement the right algorithm for your needs -- with just enough math to let you understand and analyze algorithm performance.

With its focus on application, rather than theory, 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.

With this book, you will:
Solve a particular coding problem or improve on the performance of an existing solution
Quickly locate algorithms that relate to the problems you want to solve, and determine why a particular algorithm is the right one to use
Get algorithmic solutions in C, C++, Java, and Ruby with implementation tips
Learn the expected performance of an algorithm, and the conditions it needs to perform at its best
Discover the impact that similar design decisions have on different algorithms
Learn advanced data structures to improve the efficiency of algorithms
With Algorithms in a Nutshell, you'll learn how to improve the performance of key algorithms essential for the success of your software applications.

362 pages, Paperback

First published October 14, 2008

121 people are currently reading
1078 people want to read

About the author

George T. Heineman

11 books5 followers
George T. Heineman is an Associate Professor of Computer Science at WPI. His research interests are in Software Engineering. He co-edited the 2001 book "Component-Based Software Engineering: Putting the Pieces Together". He is nearly half-way towards his childhood goal of writing one million lines of code.

Aside from his professional pursuits, George is an avid puzzler. He invented Sujiken(R), a Sudoku variation played on a right-triangle arrangement of cells in which numbers cannot repeat in a horizontal row, vertical column or diagonal in any direction.
"

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
102 (26%)
4 stars
158 (41%)
3 stars
91 (24%)
2 stars
22 (5%)
1 star
5 (1%)
Displaying 1 - 27 of 27 reviews
Profile Image for Mohamed Elsherif.
32 reviews270 followers
January 14, 2018
This book is fantastic, assuming you are already familiar with the subject, it can really be a great refresher, it is short, you can get through it on a weekend or so, and the 1-pager per algorithm is great, reminds me of old school study notes.
Profile Image for Islomjon.
164 reviews5 followers
January 19, 2020
If you want to read an easy book about algorithms, then the "Algorithms in a Nutshell" is not primarily for you. Abstruse explanations of the basic algorithms make this book readable only for experts in Computer Science field. Perhaps, authors for the sake of pages, decided to explain topics in a short and complex manner.

A practical guide gives you multiple algorithms in three programming languages such as C++, Python and Java, moreover, authors provide with pseudocode to each algorithm that they use. It also covers basic algorithms used in Sorting, Searching, and, most interestingly, algorithms used in Artificial Intelligence, Computational Geometry. As an epilogue they sum up all content of the book and advise how to demise a comprehensive algorithm.
Profile Image for Spencer.
146 reviews
May 23, 2011
I enjoyed this book. The approach is sound. The charts and short descriptions are very useful.
Profile Image for Yuh-Jia Lim.
1 review
July 21, 2010
Pros:
A quick read for sorting and search algorithms. Clear explanations and to-the-point. Very practical.

Cons:
Does not provide a very comprehensive list or sorting algorithms.
Profile Image for Janardan Misra.
30 reviews4 followers
December 28, 2014
Experimental Algorithmics is an emerging area of active interest and this is one of the few books presenting the subject matter from the point of programmers and discussing the relative efficiency of algorithms from practitioner's perspective.
Profile Image for Carlo.
23 reviews
July 27, 2017
This book is meant to be a handy desk reference to the most commonly used algorithms, and for that purpose, it's perfect. If you're expecting a tutorial style book or a comprehensive reference, you'll be disappointed.
Profile Image for Marshall Upshur.
8 reviews
November 25, 2013
I think this is a good book to read before delving fully into the Algorithm Design manual or heavier algorithms books. Good refresher and quick guide to highly used sorts and such.
51 reviews15 followers
November 15, 2014
Not more algorythms, only basic (but A* Star have been contaned in).
Nice infographics with main info for each algoryhtm.
Good that author used C and Java for examples, not only pseudocode.
Profile Image for Bernie4444.
2,465 reviews11 followers
November 29, 2022
Quickly locate algorithms that relate to the problems that you want to solve

I have a pretty good collection of books on algorithms. Many O'Reilly books are in the collection. Yet I am most impressed with” Algorithms in a Nutshell “a desktop quick reference. I won't go into a lot of detail as anybody who purchases this book already knew what they're looking for. I am impressed however that for such a small book this goes into a lot of deep concepts and gives you practical solutions.

The best way to see if this book is useful compared to others is to look at sorting algorithms that you know by heart such as median sort and quicksort. If this book tells you what you already know or even does a better job of explaining what you know this is the book for you. This is the book for me.

Even with these examples, which take very little adjustment to put into the real world, you may want to supplement this book with “Sorting and Searching (The Art of Computer Programming, Volume 3)” by Donald E Knuth, Richard S Varga, and Michael A. Harrison.

Even if you are not a programmer this book can help you to understand what programmers and or coders are accomplishing with their programs. For people taking any math discipline school, this makes a fantastic supplement to understanding math from a different angle.
388 reviews4 followers
December 10, 2024
I appreciated the introductory chapters and the very short epilogue with some clear principles. The six central chapters on various classes of algorithms are not meant to be read from cover to cover, but rather to be used as quick reference when you have a problem and explanations elsewhere failed to illuminate you. I've skimmed most chapters and found them pretty clear. Do note that the book assumes intermediate programming skills in at least one of the example programming languages (mostly Java, C++, Ruby) and, for some proofs, knowledge of calculus at high school/first year of university level. There are additional references to explore the details if that's what you're looking for.

This is a rather timeless book. These algorithms have been relevant for decades, as have most of the programming languages used to illustrate them. I sure hope most readers won't have to handle low-level memory allocation tricks shown here, but seeing how C/C++ works (or doesn't) remains very educational to learn how computers work.

5 stars were sealed when the authors managed to teach me some Scheme and mentioned Ward Cunningham and the Gang of Four.
10 reviews
June 10, 2020
This book gives a short but broad overview of popular algorithms.

In general, there is just technical implementation and description of each topic and lack of context/applications. In my opinion, the context of algorithms would not only improve readability, but also help understand topic better(as it was in last chapter). I liked author's approach of comparing different algorithms in terms of time & space complexity. Some ideas were presented poorly and basic wikipedia page was much clearer to me.
1 review1 follower
September 25, 2019
Assumes a lot of knowledge. Not written in a clear or understandable way.
A lot of information in the book isn't required which slows down progress getting to the crux of the information.
Profile Image for Fábio.
9 reviews
October 13, 2020
The book uses too much of its space to talk about benchmarks that serve no purpose. Those benchmarks are machine-dependent and it will be different for each machine that runs them. It is pointless to even look at them.

The analysis of the presented algorithms is very superficial.

This is not a book I would pick as a first book and I wouldn't go out of my way to read it. Because I've made already to the 7th chapter, I will finish it. But only because I've already invested too much time into it.
Profile Image for Jose  Seco Sanz.
261 reviews17 followers
October 15, 2024
This is an advanced book that preassumes much knowledge from you. Not what I was looking for, but won't score it negatively because of that.
Profile Image for Josh Davis.
85 reviews28 followers
January 16, 2015
This is a nice little book to keep on a shelf. It wouldn't be my first pick as a reference for algorithms, however. It was worth reading as it doesn't focus much on the theory of algorithms, instead it focuses on the application of algorithms. It has very helpful "fact sheets" that includes pseudocode and run-time complexity for common algorithms. Overall, it is definitely worth reading but I wouldn't go out of my way to read it.
Profile Image for Max Galkin.
22 reviews47 followers
July 10, 2013
Average quality. Wouldn't recommend this book. Lacks struсture (not clear why this set of algorithms is covered and why in this order), lacks theoretical soundness, almost no algorithm analysis. The books is definitely not appropriate for learning those algorithms from scratch, and not even particularly appropriate for refreshing the knowledge.
One positive factor I can highlight: nice graphical summaries and overall nice illustration for algorithms.
4 reviews
August 15, 2009
This book is amazingly awesome. Super practical boiled down algorithms useful for everyday programming and extremely well organized for reference and algorithm selection. Although not light reading, it is very non-crufty. This is a great book to read and have on the bookshelf for those deeply involved in the craft of programming.
Profile Image for Alan.
27 reviews
February 20, 2013
A reference any programmer can benefit from, yes you might have covered some of these algorithms in college/school but this is a concise practical format with some good low level examples of implementation. I read this in preparing for interviews and it helped enormously, refreshing algorithms that I'd neglected or used seldom.
Profile Image for Ben.
191 reviews14 followers
November 7, 2016
A decent recap of major algorithms, but too much time is spent on showing tables of not-very-valuable runtime performance numbers. More text could have been devote to the concepts themselves or pseudo-code that skipped the implementation details to keep things concise.
Profile Image for Douglas.
158 reviews13 followers
July 14, 2010
Too far over my head for my daily use, but bound to come in handy.
Profile Image for Akshat Mathur.
5 reviews1 follower
April 24, 2017
Great book for brushing up your algorithmic knowledge, can be a great reference book but not recommended as a soul text-book.
Displaying 1 - 27 of 27 reviews

Can't find what you're looking for?

Get help and learn more about the design.