Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Buy Used
FREE Shipping on orders over $25.
Condition: Used: Very Good
Comment: Cover has some shelf and edge wear, pages are in very good condition. No writing or highlighting. Expedited shipping available.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Algorithms in a Nutshell (In a Nutshell (O'Reilly)) Paperback – October 21, 2008

4.1 out of 5 stars 32 customer reviews

See all 4 formats and editions Hide other formats and editions
New from Used from
"Please retry"
$24.19 $2.11

There is a newer edition of this item:

Windows 10 For Dummies Video Training
Get up to speed with Windows 10 with this video training course from For Dummies. Learn more.
click to open popover

Editorial Reviews

About the Author

George 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 was the Program Chair for the 2005 International Symposium on Component-Based Software Engineering.

Gary Pollice is a self-labeled curmudgeon (that's a crusty, ill-tempered, usually old man) who spent over 35 years in industry trying to figure out what he wanted to be when he grew up. Even though he hasn't grown up yet, he did make the move in 2003 to the hallowed halls of academia where he has been corrupting the minds of the next generation of software developers with radical ideas like, "develop software for your customer, learn how to work as part of a team, design and code quality and elegance and correctness counts, and it's okay to be a nerd as long as you are a great one."

Gary is a Professor of Practice (meaning he had a real job before becoming a professor) at Worcester Polytechnic Institute. He went to WPI because he was so impressed with the WPI graduates that he's worked with over the years. He lives in central Massachusetts with his wife, Vikki, and their two dogs, Aloysius and Ignatius. When not working on geeky things he ... well he's always working on geeky things. You can see what he's up to by visiting his WPI home page at: http://web.cs.wpi.edu/~gpollice/. Feel free to drop him a note and complain or cheer about the book.

Stanley Selkow received a BS in Electrical Engineering from Carnegie Institute of Technology in 1965, and then a Ph.D. in the same area from the University of Pennsylvania in 1970. From 1968 to 1970 he was in the Public Health Service at the National Institutes of Health at Bethesda Maryland. Since 1970 he has been on the faculty at universities in Knoxville TN and Worcester MA, as well as Montreal, Chonqing, Lausanne and Paris. His major research has been in graph theory and algorithm design.


The latest book club pick from Oprah
"The Underground Railroad" by Colson Whitehead is a magnificent novel chronicling a young slave's adventures as she makes a desperate bid for freedom in the antebellum South. See more

Product Details

  • Series: In a Nutshell (O'Reilly)
  • Paperback: 364 pages
  • Publisher: O'Reilly Media; 1 edition (October 21, 2008)
  • Language: English
  • ISBN-10: 059651624X
  • ISBN-13: 978-0596516246
  • Product Dimensions: 5.9 x 0.9 x 8.9 inches
  • Shipping Weight: 1.2 pounds
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (32 customer reviews)
  • Amazon Best Sellers Rank: #289,580 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

Format: Paperback
In recent years I have found most other non-textbooks on algorithms to be uninteresting mainly for two reasons. First, there are books that are re-released periodically in a new "programming language du jour" without adding real value (some moving from Pascal to C/C++ to Python, Java or C#). The second group are books that are rather unimaginative collections of elementary information, often augmenting their bulk with lengthy pages of source code (touted as "ready-to-use", but never actually usable).

I almost didn't pay any attention to this book because its title struck me as rather mundane and pedestrian .... what an uncommonly false first-impression that turned out to be!

The is a well-written book and a great practical and usable one for working software developers at any skill or experience level. It starts with a condensed set of introductory material. It then covers the gamut of common and some not-so-common algorithms grouped by problems/tasks that do come up in a variety of real-world applications.

I particularly appreciate the concise and thoughtful - and concise - descriptions -- chock-full of notes on applicability and usability -- with absolutely no fluff! If nothing else, this book can be a good quick index or a chit sheet before culling through more standard textbooks (many of which, in fact, mentioned as further references in each section).

I believe the authors have identified a valid "hole" in the technical bookshelves - and plugged it quite well! Regarding the book's title, ... now I feel it's just appropriately simple, honest, and down-to-earth.
Comment 84 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This new book on algorithms from O'Reilly is a breath of fresh air. Most books on the subject fall into two categories: very dense tomes full of math and heavy on sometime unintelligible pseudocode, or books that basically just give you recipes without much understanding. The second category is the "give a man a fish" type, the first type is the "teach a man to fish, but use ALGOL to do it". Even the author, in his preface, recognizes that this is not the one book on algorithms you'd need if you were on a desert island. On a desert island you have plenty of time and you can carefully digest Cormen's Introduction to Algorithms. However, you're not on a desert island, are you? Thus this book is the link between Cormen's careful theoretical approach that takes time, and books that amount to code dumps.

The first six chapters amount to supplements on the basics of Theory of Algorithm courses: mathematics foundations, sorting, searching, and graphing algorithms. The mathematics here is somewhat lacking, but then the author is assuming you have other books on the subject - this is a book for ramping up quickly. The rest of the book is rather specialized, considering specific families of algorithms that are topical in these times such as path finding in AI, computational geometry, and network flow. They fill in the blanks missing in the standard textbooks. Plus there is plenty of code - real code, not pseudocode - that you can put to work quickly. The product description lacks the table of contents, so I list that next:

Part I: I
Chapter 1. Algorithms Matter
Section 1.1. Understand the Problem
Section 1.2. Experiment if Necessary
Section 1.3. Side Story
Section 1.4. The Moral of the Story
Section 1.5. References
Chapter 2.
Read more ›
Comment 105 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
The book does not aim to be an introduction to, nor the definitive encyclopedia on, the subject of algorithms.

It is intended, as advertised on the cover, as "A Desktop Quick Reference". In the Preface it states that the goal is to provide a useful tool for working programmers to find good solutions to the problems they solve.

As a self-taught programmer I am finding this book interesting to better understand the various ways that the same problem can be solved, and the pros and cons of each. While the book is mainly intended to help programmers review and select appropriate algorithms for a problem at hand, I am using it as a study guide and have enjoyed it as such thus far. While it doesn't exactly make for light reading, each algorithm is considered individually, which makes for a decent size chunk of information which can be considered independently.

Multiple languages (C, C++, Java, Ruby) are used throughout the book in demonstrating the algorithms, solutions are not provided in each language for each algorithm. However, if you are using this as a study guide, this can provide a good exercise to translate the solution into the language of your liking.
Comment 29 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Paperback
This book didn't appeal much to me. The language is chatty and dry at the same time. It's not entertaining or motivating. I sometimes feel the authors are talking down to their readers. They tell us that a mere 'software practitioner' shouldn't be expected to understand Ford-Fulkerson's method from plain pseudocode, yet THEY (the authors) understood it, as did I. The authors could have explained what exactly is so hard to get about that particular example.

Books of this sort commonly differentiate between data structures and algorithms, and that for a good reason. In this book the two concepts are often mixed together in a mess. E.g. heapsort is introduced on p. 86 as an algorithm, but the binary heap is not clearly explained as a data structure. That is, the book does not mention it's common operations. Later, when we come to Dijkstra's shortest path algorithm on p. 154, the 'decreaseKey' operation is mentioned and used (but not explained!) as if the reader must know what that is. This would be very confusing for readers who have not learned about data structures elsewhere.

On p. 36 we are shown an example of calculating big numbers in scheme. The authors then asks: "Is it an advantage or a disadvantage that the underlying architecture is hidden from us, abstracted away?" (most scheme implementations support 'big ints' transparently).

To investigate this important question two hypotheses (stylishly named Hypotheses H1 and Hypotheses H2) are considered. These are basically stating that computations with big integers are indistinguishable from computations with fixed sized integers. By conducting some clever empirical 'benchmark tests', the authors arrives at the stunning conclusion that computations with big integers gradually become slower as they grow.
Read more ›
2 Comments 31 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Recent Customer Reviews