Automotive Holiday Deals Books Holiday Gift Guide Shop Men's Athletic Shoes Learn more nav_sap_SWP_6M_fly_beacon Train egg_2015 All-New Amazon Fire TV Beauty Deals Gifts for Her Find the Best Purina Pro Plan for Your Pet Amazon Gift Card Offer cm15 cm15 cm15 $30 Off Amazon Echo $30 Off Fire HD 6 Kindle Cyber Monday Deals Classics and Essentials in CDs & Vinyl Outdoor Deals on DOTD
Algorithms in a Nutshell (In a Nutshell (O'Reilly)) and thousands of other textbooks are available for instant download on your Kindle Fire tablet or on the free Kindle apps for iPad, Android tablets, PC or Mac.

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 email address or mobile phone number.

  • List Price: $49.99
  • Save: $16.03 (32%)
FREE Shipping on orders over $35.
In Stock.
Ships from and sold by Gift-wrap available.
Algorithms in a Nutshell ... has been added to your Cart
Condition: Used: Good
Comment: Ships direct from Amazon! Qualifies for Prime Shipping and FREE standard shipping for orders over $25. Overnight and 2 day shipping available!
Sell yours for a Gift Card
We'll buy it for $6.91
Learn More
Trade in now
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

29 customer reviews

See all 6 formats and editions Hide other formats and editions
New from Used from
"Please retry"
Rent from
"Please retry"
$26.33 $13.00

There is a newer edition of this item:

Algorithms in a Nutshell: A Desktop Quick Reference
This title has not yet been released.

Take an Extra 30% Off Any Book
$33.96 FREE Shipping on orders over $35. In Stock. Ships from and sold by Gift-wrap available.

Frequently Bought Together

  • Algorithms in a Nutshell (In a Nutshell (O'Reilly))
  • +
  • Data Structures and Algorithms Made Easy: Data Structure and Algorithmic Puzzles, Second Edition
Total price: $69.95
Buy the selected items together

Special Offers and Product Promotions

  • Take an Extra 30% Off Any Book: Use promo code HOLIDAY30 at checkout to get an extra 30% off any book for a limited time. Excludes Kindle eBooks and Audible Audiobooks. Restrictions apply. Learn more | Shop now

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: 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.

Looking for the Audiobook Edition?
Tell us that you'd like this title to be produced as an audiobook, and we'll alert our colleagues at If you are the author or rights holder, let Audible help you produce the audiobook: Learn more at

Product Details

  • Series: In a Nutshell (O'Reilly)
  • Paperback: 364 pages
  • Publisher: O'Reilly Media; 1 edition (October 24, 2008)
  • Language: English
  • ISBN-10: 059651624X
  • ISBN-13: 978-0596516246
  • Product Dimensions: 6 x 0.9 x 9 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (29 customer reviews)
  • Amazon Best Sellers Rank: #213,448 in Books (See Top 100 in Books)

More About the Authors

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Most Helpful Customer Reviews

80 of 84 people found the following review helpful By KJ on December 12, 2008
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 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
104 of 114 people found the following review helpful By calvinnme HALL OF FAMETOP 1000 REVIEWERVINE VOICE on October 25, 2008
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 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
29 of 30 people found the following review helpful By J. Pease on March 23, 2009
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 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
29 of 36 people found the following review helpful By T. B. Gausen on November 5, 2010
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 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

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
Algorithms in a Nutshell (In a Nutshell (O'Reilly))
This item: Algorithms in a Nutshell (In a Nutshell (O'Reilly))
Price: $33.96
Ships from and sold by