Jump to ratings and reviews
Rate this book

The Algorithm Design Manual

Rate this book
....The most comprehensive guide to designing practical and efficient algorithms!.... The Algorithm Design Manual, Second Edition "...the book is an algorithm-implementation treasure trove, and putting all of these implementations in one place was no small feat. The list of implementations [and] extensive bibliography make the book an invaluable resource for everyone interested in the subject." --ACM Computing Reviews "It has all the right rich contents, friendly, personal language, subtle humor, the right references, and a plethora of pointers to resources." -- P. Takis Metaxas, Wellesley College "This is the most approachable book on algorithms I have." -- Megan Squire, Elon University, USA This newly expanded and updated second edition of the best-selling classic continues to take the "mystery" out of designing algorithms, and analyzing their efficacy and efficiency. Expanding on the first edition, the book now serves as the primary textbook of choice for algorithm design courses while maintaining its status as the premier practical reference guide to algorithms for programmers, researchers, and students. The reader-friendly Algorithm Design Manual provides straightforward access to combinatorial algorithms technology, stressing design over analysis. The first part, Techniques , provides accessible instruction on methods for designing and analyzing computer algorithms. The second part, Resources , is intended for browsing and reference, and comprises the catalog of algorithmic resources, implementations and an extensive bibliography. NEW to the second • Doubles the tutorial material and exercises over the first edition • Provides full online support for lecturers, and a completely updated and improved website component with lecture slides, audio and video • Contains a unique catalog identifying the 75 algorithmic problems that arise most often in practice, leading the reader down the right path to solve them • Includes several NEW "war stories" relating experiences from real-world applications • Provides up-to-date links leading to the very best algorithm implementations available in C, C++, and Java ADDITIONAL Learning • Exercises include "job interview problems" from major software companies • Highlighted take-home lesson boxes emphasize essential concepts • Provides comprehensive references to both survey articles and the primary literature • Exercises points to relevant programming contest challenge problems • Many algorithms presented with actual code (written in C) as well as pseudo-code • A full set of lecture slides and additional material available at www.algorist.com Written by a well-known algorithms researcher who received the IEEE Computer Science and Engineering Teaching Award, this new edition of The Algorithm Design Manual is an essential learning tool for students needing a solid grounding in algorithms, as well as a special text/reference for professionals who need an authoritative and insightful guide. Professor Skiena is also author of the popular Springer text, Programming The Programming Contest Training Manual .

748 pages, Perfect Paperback

First published November 14, 1997

Loading interface...
Loading interface...

About the author

Steven S. Skiena

16 books109 followers

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
1,415 (53%)
4 stars
835 (31%)
3 stars
283 (10%)
2 stars
59 (2%)
1 star
31 (1%)
Displaying 1 - 30 of 96 reviews
4 reviews4 followers
May 30, 2011
When you want to read a good introductory book about algorithms and data structures the choice comes down to two books: Introduction to Algorithms, Second Edition and this one. I especially liked The Algorithm Design Manual because of the author's writing style, the "war stories" (that are some clever and practical applications of the data structures and algorithms the author tries to teach you) and the second half part of the book which is a sort of encyclopedia of problems.

I used the "introductory" adjective earlier as this is supposed to be an introductory book on the topic. In reality, even though it starts from the basics of math and programming, the topics covered are broad enough and discussed in much depth to make it appealing even to the senior programmer.

In short, this is a book every decent programmer should read at least once, besides it works also as a algorithms/data structures encyclopedia that always comes handy.
Profile Image for Christian Brumm.
84 reviews19 followers
December 18, 2011
In comparison to "Introduction to Algorithms" (the other algorithm book I had significant exposure to) this one is faster to read, easier to digest and more tailored towards applications.

I found the "Hitchhiker's Guide to Algorithms" in the back to be extremely useful if you really find yourself tackling an algorithmic problem in practice.

The main part (maybe skipping/skimming down a few chapters) is a very good preparation for algorithm-heavy job interviews (e.g. Google, Facebook etc ...).

Very much recommended.
47 reviews
July 8, 2010
This book is a practical, example-driven book on computer science algorithms, which is very readable and has a wealth of ready-to-use examples. The tutorial material in the first half of the book covers the essentials: data structures such as lists, arrays, stacks, queues, binary trees, etc. The book spends a lot of time emphasizing the utility of graph algorithms and how to model various classes of problems with them, as well as lot of time on dynamic programming and backtracking/enumeration. A unique and illuminating feature of this book is an extensive collection of "war stories" describing the author's personal experiences with applying these algorithmic tools in various circumstances (quite fascinating, and some a bit darkly humorous). The extensive collections of problems at the end of each tutorial chapter provide excellent practice; in particular, the lists of "interview problems" for drilling are very valuable preparation.
The second half of the book is collection of short essays on various kinds of problems and sketches of techniques to handle them. This is very useful for gaining a broad overview of what tools are available, though the coverage can be somewhat brief (e.g., I felt that some aspects of string algorithms were treated quite telegraphically, e.g., suffix trees, and also the Hungarian algorithm for assignments was barely mentioned). Also, there were not that many examples in the second half. It is really intended as a set of pointers to get you started on where to look up details for approaches to a particular problem, and in that respect succeeds quite well (and has a lot of up-to-date references).

I would give this book 4 1/2 stars; it has a fair share of typos, and sometimes problems are duplicated in different sections; this probably reflects how the book was updated. The book is rather lighter on proofs than, say Cormen/Leiserson/Rivest/etc., and so one should probably have a more rigorous book at hand to fill in some details when necessary. The choice of topics and the style reflect the author's extensive consulting experience, as well has his work on contest programming (he wrote another entire book dedicated to Programming Challenges). The fact that this book focuses on working source code in examples (as opposed to just pseudo-code) makes it extremely useful for drilling for programming interviews.

In fact, I learned about it from Steve Yegge's blog post:

http://steve-yegge.blogspot.com/2008/...

The remainder of his advice is also invaluable. Here are a couple of other very valuable resources:

http://courses.csail.mit.edu/iap/inte...

http://careercup.com/ (both the books and the forums).

Overall, essential reading if you are studying for a programming interview.

Profile Image for Josh Davis.
74 reviews28 followers
January 23, 2014
I can't think of an occasion when I'd recommend this over Intro to Algorithms (CLRS). It does a fraction of what CLRS does and worse in most cases. And in the rest of the cases, it does them exactly the same. There were some instances (graph algorithms) where the code in Skiena was taken straight out of CLRS. Not only did CLRS explain the algorithm better but it had the proofs to back it up.

Speaking of proofs, this is what I hated about Skiena. It has barely any proofs in comparison to CLRS. A lot of people might enjoy this, but I feel that having the mathematical understanding of algorithms and the proofs to back it up will greatly increase your understanding of the material. A short proof instead of a little hand waving goes a long way.

Basically, get CLRS and don't look back.
Profile Image for Nick Black.
Author 2 books840 followers
October 9, 2013
great practical guide, lots of fun to read on the subway. probably a better book to carry around in one's professional life than CLR, though it lacks some of the theoretical intensity of the Big White Book. i'm interviewing with Google and Amazon this week and picked it up to refresh myself on graph algorithms and strategies for NP-complete problems, and it delivered, with perhaps greater effect (and certainly less time) than rereading Algorithmic Graph Theory and The Theory of NP Completeness.
Profile Image for محمد.
Author 1 book400 followers
October 3, 2015
This is not an introductory book. You should have some previous knowledge of algorithms to enjoy it. The book builds a way of thinking towards solving algorithms problems, instead of just stating the algorithms and data structures in a mechanical way, but in many parts it is not very clear and you have to read a passage multiple times to understand what the author meant.

The book can be used as a reference that you can use to understand a specific topic.
Profile Image for Joe.
418 reviews17 followers
December 5, 2018
The rare computer programming book that I finished start-to-finish.

The first half of the book tells you why some things take longer to compute than other things. This helps data scientists / statisticians / analysts who work with large amounts of data.

In the first half, the math and the computer code can get pretty heavy. But I found the text around it was written so you could skim the hard stuff, get the idea, and keep going.

The second half of the book is a reference. As Hadley Wickham said in his review on Fivebooks, this is helpful for Googling things. I've found that a lot of computer programming is easy if you just know the name of thing you need to Google. This gets you there.
Profile Image for Nick Greenquist.
116 reviews3 followers
September 21, 2022
Long and difficult book to get through. I did most of the problems but started skipping many towards the final chapters (8 and 9). I also skipped all the problems in chapter 10, which dealt with NP hard problems and approximate algos and more proofy ones about reducing problems down to satisfiability. This was mostly because I already knew going in that I wasnt interested in those sections (did them and school and realized that they're not that useful unless you go into research or academia).

But regardless, the reason for the 3 stars is that this book tries to straddle the middle of being a practical interview prep book and being a proof heavy, theoretical Algo book.

If I were to go back in time, I'd probably pick either a 100% practical Algo book or something like CLRS for very rigorous understanding.
Profile Image for Michael Burnam-Fink.
1,580 reviews263 followers
April 5, 2022
Skiena is incredible!

I'll be upfront that I'm a pragmatist as a programmer. I some actual training in data science and machine learning, which is arcane enough on it's own, and a few years experience to call myself Good With Pandas, but the thing about being an autodidact solving a limited set of business problems in Python is that you miss the big picture. In a mature ecosystem like Python, a lot of the time the right answer is just "pip install magiclib. from magiclib import incantation. bar = incantation(foo)" Except sometimes magiclib doesn't exist yet. At the end of the day, computers are all Turing machines, they all solve the same sets of problems, but some approaches are algorithmically tractable, and some will leave you lost in the Swamp of Sadness.


Artax has been asked to solve a large NP complete problem

For someone who's never taken CS101, this book an eye-opener into the hows and whys of basic data structures like linked lists, trees, hash tables, and arrays, as well as sorting techniques and more advanced practices like dynamic programming. Clear explainers are interspersed with practical war stories, where Skiena explains how he applied the technique just discussed to solve a previously intractable problem.

Cracking the Coding interview is a series of dog tricks. The Algorithm Design Manual is actual knowledge. It's been a great guide to actually thinking like a professional, even if most of the day job is data plumbing.
Profile Image for Matt McCormick.
45 reviews32 followers
July 29, 2020
A very thorough book but I found that the explanations for most algorithms could have been better. I found it to be more of a reference book for looking up how to write an algorithm if you need one rather than learning well about a variety of algorithms.
Profile Image for Sophie.
282 reviews
September 20, 2021
Though this is a 1998 edition, it explains essential algorithms concisely.

Notes

pp. 28-32
Fundamental Data Types
1. Containers:
• Fundamental Operations:
Put(C,x): Insert a new data item x into the container C.
Get(C): Retrieve the next item from the container C. Different types of containers support different retrieval orders, based on insertion order or position.
• Popular Types of Containers:
(1) Stacks - Last in, first out (LIFO). The put and get operations for stacks are usually called push and pop.
(2) Queues - First in, first out (FIFO). The put and get operations for stacks are usually called enqueue and dequeue.
(3) Tables: Supports retrieval by position, so that put and get each accept an index as an argument. Tables are naturally implemented using arrays.
2. Dictionaries:
• Primary Operations:
Search(D, k): Given a search key k, return a pointer to the element in dictionary D whose key value is k, if one exists.
Insert(D, x): Given a data item x, add it to the set of items in the dictionary D.
Delete(D, x): Given a pointer to a given data item x in the dictionary D, remove it from D.
• Certain dictionary data structures support the following operations:
Max(D) or Min(D)
Predecessor(D, k) or Successor(D, k)
3. Binary Search Trees
4. Priority Queues

pp. 36-38

Approaches to Sorting
1. Data Structures: Repeatedly extracts the smallest remaining element from the unsorted part of the set but will take a total of O(n^2)time aka heapsort.

SelectionSort(A)
For i = 1 to n do
Sort[i] = Find-Minimum from A
Delete-Minimum from A
Return(Sort)

2. Incremental Insertion: Select an arbitrary element from the unsorted set, and put it in the proper position in the sorted set. Though it takes O(n^2) in the worst scenario, it will perform much better if the data is sorted.

InsertionSort(A)
A[0] = -∞
for i = 1 to n - 1 do
j = i
while (A[j] > A[j-1]) do swap(A[j], A[j-1])

3. Divide and Conquer: Suppose we take n elements to sort and split them into piles S and T, each with half the elements. After sorting both piles, it is easy to combine the two sorted piles and takes O(n log n) in the worst scenario.

MergeSort(A[1, n])
Merge( MergeSort(A[1, [n/2]]), MergeSort(A[[n/2] + 1, n]))

4. Randomization
5. Bucketing Techniques


17 reviews2 followers
October 14, 2020
Certainly worth a read. I give it 5 stars because it certainly deserves 4, and I'd love more software developers to read it :).

I liked that algorithms were not presented in vacuum. Quite the opposite. A lot of attention is placed on practical applications of algorithms. Author talks a lot about ways to recognize that many popular problems can be solved using popular algorithms.

In my opinion, this book has a very pragmatic approach. It doesn't go into details of flavors of algorithms that most developers won't need in their daily work. At the same time, it offers a broad overview of many topics, so you know what is there.

Consequently, implementation is usually shown for the basic algorithms, and half of the book is a catalog of problems with references to existing libraries implementing solutions.

I liked how the book teaches techniques more than algorithms itself. For example, when it gets to graphs, it features implementations of depth-first-search and breadth-first-search as customizable templates. Then several other algorithms are presented as a simple variations on DFS or BFS. In the chapter about dynamic programming, instead of discussing just one specific implementation of the classic edit distance algorithm, it describes a lot of variations where slight modifications to the "edit distance" can be used to solve different problems. When presenting NP problems, author teaches you how to recognize if your problem is NP or not, so you know if you should look for an efficient algorithm or settle for a heuristic.

Because of that focus on design and techniques, the book misses many popular algorithms that other books usually include. In this book, you will not find: A*, details of various flavors of hash tables, details of splay trees, red-black trees, KMP pattern searching, and so on. On the other hand, you may have to research some topics like that yourself when doing exercises.

If you have time to do exercises, I strongly encourage that. They'll give you insights, let you practice what you've just learned or show where techniques discussed in the chapter fail to work. Exercises are divided into sections so you can quickly pick one that you like. E.g. interview problems are listed separately, and in my career I have actually been asked some of these questions on job interviews. Exercises are also graded by difficulty.

I saw reviews that compare this book with Cormen's "Introduction To Algorithms". There is overlap, but also the style and focus of these two books are very different. Depending on your needs, you may like one more than the other.
Profile Image for Vibhor Rawal.
45 reviews7 followers
November 17, 2020
When I picked it up, I instantly became a fan of Skiena. Some of the writings span beyond algorithm design and it was a delight reading those. Especially the war stories helped as a reader to get a clearer picture of an algorist's job. Though in my opinion the book deteriorates in writing quality (not knowledge imparted per chapter), it still is a good design manual, don't get me wrong the worst pages of this book felt superior to some other books out their.

===========================================
Here are some of the wordings that were a sugar candy to read-

Proofs are useful only when they are honest.

Pseudocode is perhaps the most mysterious of the bunch, but it is best defined as a programming language that never complains about syntax errors.

recursion is mathematical induction.

a computer scientist is a mathematician who only knows how to prove things by induction.

algorist as “one skillful in reckonings or figuring.”

The moral of logarithmic growth is clear: “If you are gonna do the crime, make it worth the time!”

An Ω(n log n) lower bound can be shown by observing that any sorting algorithm must behave differently during execution on each of the distinct n! permutations of n keys. The outcome of each pairwise comparison governs the run-time behavior of any comparison-based sorting algorithm. We can think of the set of all possible executions of such an algorithm as a tree with n! leaves. The minimum height tree corresponds to the fastest possible algorithm, and it happens that lg(n!) = Θ(n log n).

Strategy represents the quest for the big picture—the framework around which we construct our path to the goal. Tactics are used to win the minor battles we must fight along the way. In problem-solving, it is important to check repeatedly whether you are thinking on the right level. If you do not have a global strategy of how you are going to attack your problem, it is pointless to worry about the tactics.

===========================================

This book definitely helps solidify some ideas, but the second half didn't sell for me (where it's all here's some algos, these are the places you will find them, ask these questions to yourself for finding how and if to use these) . It did not feel thorough in the sense that most of the algos given are briefly discussed and their implementation is out of the bounds of the book, maybe it suffices it's purpose and for some it will be a blessing to find the references material and latch onto it for more information. But for me it distinguished this book from a 5 star to a 4.
Profile Image for Ivan Koma.
378 reviews1 follower
December 25, 2021
(FR) Я бы мог начать выпендриваться и восторгаться книгой, но для людей с моим интеллектом могут возникнуть проблемы... Я вообще не понял вторую главу дальше начала
Мне всегда казалось чт�� если ты пишешь книгу, ты должен написать ее на таком языке, чтобы даже самый тупой человек (я) мог немного понять её, тут же у меня было ощущение, что кто-то решил поиграться "нейронными мускулами", это конечно не претензия, просто когда я читал становилось скучно, и это при том что я люблю формулы и прочее, но примеры просто что-то, чем ты не проникаешься, а порой и вообще не понимаешь что это за ерунда (ясновиденью привет)
Сразу говорю что читал в русском переводе, может быть это сказалось, но иногда хочется что-то читнуть на своем языке, возможно это не лучшая идея, распространять такую хотелку на технические книги
И еще в книге 60% упражнений, решил ли кто-нибудь их все, останется загадкой навсегда...
Profile Image for Danial Kalbasi.
47 reviews7 followers
December 1, 2019
A useful read for anyone who likes to have a deeper understanding of algorithm design. The book covers many aspects such as time/space complexity, NP-completeness, and many other concepts. The part that I personally really appreciate was the first few chapters about how to set our mindset to design an algorithm.

This book, like most academic books, is hard to read and comprehend and needs the reader to do more research about the subjects. I wish people who write these books, they come out of their academic cave. It doesn't need to use complex writing structures or tough vocabularies to explain a simple idea.

This book, of course, is not something you read from A to Z. It's probably good as a reference.
Profile Image for Kirill.
Author 1 book12 followers
October 9, 2020
Most of the books in this category provide a rigorous catalog of different algorithmic problems and their solutions, and this one is not an exception. At least its second part. What makes this books stand out is its first half. There, author provides a practical view on solving algorithmic problems, providing intuitive explanations of the major problems in each category. Each of the first 10 chapters also contain war stories, where the algorithms are brought to real practical applications based on the author’s experience.
And if you’ll need a more complete reference, the second part of the book contains a more traditional collection of various algorithms with topics ranging from sorting to black box optimization.
5 reviews
October 19, 2019
This book is just a bit less academic and a bit more casual than the famous "Introduction to Algorithms" however it's all about applications.
Every chapter starts off with a problem statement, then questions are asked to help identify hidden nuances of the problem, followed by a "War story" showing where exactly that particular algorithm found it's application and tricky exercises of course.
Author provides dozens of references to each topic so the reader could study the particular subject in details.
As well as "Introduction to Algorithms" it requires a strong background in Math (geometry, calculus) and CS.
Profile Image for Tech Nossomy.
348 reviews4 followers
September 18, 2022
Comprehensive albeit verbose book on algorithms for computational problems. Target audience primarily undergraduate computer scientists, but will be helpful to more seasoned software developers and scientists as well. Written in the first person. Applicability in a wide range of industry sectors is well argued. Bibliography spans 40+ pages, giving ample opportunity for further research.

Second edition still contains a typo here and there (eg page 43: S(n) =≥ (n/2) × (n/2)) and verbosity could have been replaced with more rigorous treatment of algorithm runtime analysis, although author discounts for this editorial choice on page 57.
Profile Image for Scott Holstad.
Author 22 books75 followers
January 20, 2020
A pretty good resource and one of the better books on the subject, in my opinion. However, many describe it as "introductory" algorithms, and I'm not sure I totally agree. Unless you already posses a solid foundation in related areas, a newbie will often find it hard to walk into this and immediately understand it. And maybe some will say that would be unrealistic, and I would be one of those. However, I actually have heard and seen others say exactly that, and again, I don't agree. Nonetheless, a pretty good book and solid resource. Recommended.
Profile Image for Philippe Fanaro.
154 reviews1 follower
July 19, 2020
A work of art and mastery of many fields. Decades and decades of research in addition to the much more valuable big picture of their integration. This is *the* book to bridge the gap between theory and practice.

I don't know if this book could be read with someone with zero knowledge of the topics involved. I am a graduate student of electrical engineering who knew a reasonable lot before trying this book out and, still, couldn't read more than 40-60 pages a day (I separated 2 weeks off for this book).
Profile Image for Harry Harman.
748 reviews13 followers
September 22, 2021
Indispensable reading for any computer scientist.

An algorithm is a procedure that takes any of the possible input instances and transforms it to the desired output.

In industrial settings, any program that seems to give good enough answers without slowing the application down is often acceptable, regardless of whether a better algorithm exists. The issue of finding the best possible answer or achieving maximum efficiency usually arises in industry only after serious performance or legal troubles
18 reviews
January 31, 2019
Holy crap, wish I'd found this book before I retired. I've been recommending Sedgwick's book for 30 years, this one is even better.

Something I really like is how he shows how useful graph theory can be. If you can turn your problem into a graph (and you'd be surprised how often you can) there are a lot of non-obvious algorithms that will beat the pants of any non-graphical algorithm. I got a B.A. in math, the most useful class I took was graph theory.
Profile Image for Mi Lia.
39 reviews5 followers
November 27, 2021
One can never say that he's done reading this book. As it's one of the books that you return all the time to. Very practical as a handbook as half of it is like a dictionary of algorithms and the problem each one of them solves. The author gives lots of code samples in-text in C. Very well written, humorous, and practical. If you need a first book for your Algorithms and Data Structures class, start with this one. Then go to the bible (CLRS). Great job prof. Skiena.
3 reviews
November 30, 2021
An excellent resource, the section in the back is great for a reference or just to read. I love the idea of the war stories, although some of them are difficult to follow or slightly dated.

The only real complaint I have about the book is a number of mistakes littered about. Some of them are small grammatical mistakes, but some are actually missing lines in algorithms, which can be super confusing.
Profile Image for Priyanka Shah.
24 reviews2 followers
April 20, 2020
Amazing and informative book for anyone interested in knowing how algorithms shape the world we live and power almost all the electronic machines we interact with on day to day basis. Most importantly gives you a zoom out version to analyze and breakdown big problems into small informative chunks which can then be processed to get a value.
Displaying 1 - 30 of 96 reviews

Can't find what you're looking for?

Get help and learn more about the design.