Jump to ratings and reviews
Rate this book

Introduction to Algorithms

Rate this book
A comprehensive update of the leading algorithms text, with new material on matchings in bipartite graphs, online algorithms, machine learning, and other topics.

Some books on algorithms are rigorous but incomplete; others cover masses of material but lack rigor. Introduction to Algorithms uniquely combines rigor and comprehensiveness. It covers a broad range of algorithms in depth, yet makes their design and analysis accessible to all levels of readers, with self-contained chapters and algorithms in pseudocode. Since the publication of the first edition, Introduction to Algorithms has become the leading algorithms text in universities worldwide as well as the standard reference for professionals. This fourth edition has been updated throughout.

New for the fourth edition
New chapters on matchings in bipartite graphs, online algorithms, and machine learningNew material on topics including solving recurrence equations, hash tables, potential functions, and suffix arrays140 new exercises and 22 new problemsReader feedback-informed improvements to old problemsClearer, more personal, and gender-neutral writing styleColor added to improve visual presentationNotes, bibliography, and index updated to reflect developments in the fieldWebsite with new supplementary material
Warning: Avoid counterfeit copies of Introduction to Algorithms by buying only from reputable retailers. Counterfeit and pirated copies are incomplete and contain errors.

1184 pages, Hardcover

First published January 1, 1989

Loading interface...
Loading interface...

About the author

Charles E. Leiserson

11 books18 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
4,901 (54%)
4 stars
2,691 (30%)
3 stars
1,038 (11%)
2 stars
219 (2%)
1 star
103 (1%)
Displaying 1 - 30 of 258 reviews
Profile Image for Shawn Morel.
5 reviews25 followers
April 7, 2013
What a terrible book. Though it's the cornerstone of many CS undergrad algorithm courses, this book fails in every way. In almost every way, Dasgupta and Papadimitriou's "Algorithms" is a much better choice: http://www.goodreads.com/book/show/13...

It tries to be a reference book presenting a good summary of algorithms but any of the interesting bits are left as "exercises to the student." Many of these exercises are do-able but far from trivial mental connections. A few require some mental Ah Ha moments.

It fails at being a reference book

It tries to be a text book (didactic) but it is too verbose and goes into too much depth on every topic along the way to be a useful guide. A possibly more useful organization would have been to have 2 virtual books, the first a much shorter textbook, the second an algorithm reference.

It fails at being a text book

It tries to be a workbook by presenting many exercises to the reader. The problem is that it provides inadequate scaffolding. It just goes ahead and gives you the answers to what could have been medium difficulty questions (since it's trying to be a mostly complete reference). This gives you no chance to flex your mental muscle on tractable problems. All of the harder problems are left as exercises without much help of how to approach them.
Profile Image for Khaled Alhourani.
5 reviews15 followers
June 10, 2011
An essential book for every programmer, you can't read this kind of book on bus, you need to fully constraint while reading it. The exercises after each chapter are very important to fully understand the chapter you just read, and to activate your brain's neurons. The book in itself is an outstanding one, very organized, focused and small chapters makes it easier to understand the algorithms inside it.

It contains the essential and most popular algorithms, so you can't live wthout it if you are real programmer.

You can skip chapters/read about an algorithm you want to understand more, as if there is a previous idea/algorithm the authors directly mention that with chapter's number so you can go directly to it for more information. I've read the 2nd edition, and now reading this one, the 3rd edition.
23 reviews10 followers
March 22, 2011
Rather pointless to review this, as in most places this is the algorithms textbook. It's a good book that covers all the major algorithms in sufficient detail with every step clearly spelled out for the students' benefit.

Unfortunately, this neatness of presentation is also its most major drawback: (1) it spends more time describing algorithms than giving the reader an idea of how to design them, and (2) it can easily give the impression that algorithms is about spending a lot of time proving obvious correctness results, which is not how people think of algorithms in real life (whether in academia, or in "real world" applications). For this reason, I'd recommend not using this fat book, and instead using either Kleinberg and Tardos's Algorithm Design, or Dasgupta–Papadimitriou–Vazirani's Algorithms, or Skeina's The Algorithm Design Manual, which are all better at showing you how to think about algorithms the right way.
Profile Image for Sumit Gouthaman.
84 reviews18 followers
December 16, 2018
I think this book is incorrectly positioned as an "Introduction" to algorithms.

If you are interested in learning algorithms, this should probably not be the first book you read. I would instead recommend Robert Sedgewick's book or course on Coursera.

The problem with this comes down to the fact that is focuses too much on the mathematical details, while ignoring other interesting aspects. Many crucial aspects of classic algorithms are relegated to the exercises section instead of being covered front and center. Even when covering important algorithms, the book glosses over important details.

When it comes to implementing algorithms, I find the pseudo-code in this book much more complicated than it needs to be. Some examples that come to mind:
1. The quick sort discussion does not important / simpler approaches like 3 way quick sort.
2. The Red-Black trees implementation and explanation is much more complicated than the simpler approach described in Sedgewick's material.

Overall, this book does have its merits. Once you've learned basic algorithms from another source, you can come back to this book to understand the underlying mathematical proofs. But I would not recommend this to be your "introduction" to algorithms.
Profile Image for Alex.
36 reviews
December 2, 2007
While searching for a Bible of algorithms, I of course quickly gravitated towards Knuth's Art of Computer Programming series. It's thousands of pages long — a magnum opus still in progress; how could it not be the most desirable source?

My research quickly yielded mixed opinions from the community. Some loved Knuth's books, while others found their language impenetrable, their code irrelevant, or their assertions wrong or out of date.

All, on the other hand, universally praised Introduction to Algorithms. While my exposure to Knuth's work is still minimal, I can certainly echo the praise for Intro.

Intro's language is academic, but understandable. If one were to put Knuth's work on the "unreadable" extreme and O'Reilly's popular Head First series on the opposite extreme, Intro would fall somewhere in the middle, leaning towards Knuth.

Intro very smartly uses pseudocode that doesn't attempt to resemble any popular programming language (with its own idiosyncratic syntax and responsibilities). Oftentimes I skip straight to the pseudocode examples, as I find them immensely readable and translatable into practical, functioning code of any language.

This book is a must-have on the shelf of any computer scientist, and any practical programmer who wants to write more efficient code. Pick it up!
Profile Image for Nick Black.
Author 2 books820 followers
December 13, 2007
An essential, well-written reference, and one it's quite possible to read through several times, picking up new info each time. That having been said....this book never, I felt, adequately communicated THE LOVE. The pseudocode employed throughout is absolutely wretched, at times (especially in later chapters) binding up and abstracting away subsidiary computational processes not with actual predefined functions but english descriptions of modifications thereof -- decide whether you're writing code samples for humans or humans-simulating-automata, please, and stick to one. This habit wouldn't be so obnoxious, save that several (although, admittedly, rare) "inline modifications of declaration" seem to require modifications of definition which would subsequently invalidate previous running-time or -space guarantees. As the STL if nothing else has taught us, usable spellbooks must include running-time analysis as part of their designs/contracts/documentations. I know the authors have released an updated edition; I do not yet own it, and could contrast with assurance only the two editions' coverage of string-matching algorithms.

That minor nit having been aired, CLR1 belongs in undergraduate curricula and on pros' bookshelves. Its illustrations, in particular, are highly effective and bring several fundamental algorithms to life better than I've seen elsewhere; its treatment of the Master Method is the best I've seen with an undergraduate audience. I'd like some algorithms from modern machine learning theory (SVM's, etc) and also multi-string / fuzzy-string matching, but those are admittedly advanced topics.

It's no Knuth, but it ain't bad.
Profile Image for Erik.
421 reviews38 followers
December 11, 2016
Final exam: completed. This damn textbook: ignored from here on out.

Whenever I look at it now, all I can think of is Alex in Clockwork Orange: "Eggiwegs! I want to SMASH THEM!"

This book did not help me in my class, not one tiny bit. Like so many other math-oriented textbooks, there is literally not one damn thing in the book that is not teachable but the teaching moments are all lost in math gymnastics, over-explaining, under-explaining, etc. Please, just once, let someone with the teaching talent of Sal Khan (of Khan Academy) write a textbook about math. Just once. Why is that so hard? Just one textbook that is focused on teaching and not befuddling, obfuscating, or jerking students' chains; a book that is not 500 pages too long; a book that teaches fundamentals before moving on to fundamentals +1 and then fundamentals +2 (not jumping to fundamentals +1432)...I'm not holding my breath, no way. This will never happen because academic math people are writing the books.

Know who would be a perfect algorithms textbook author? Someone that has to struggle through learning the subject matter just like a student. I'd buy that author's book. This one, though...let's just say I'm glad I got an international edition and not a full-price US/Canada edition. If I burn it, I'm only out $20.
Profile Image for Josh Davis.
70 reviews28 followers
January 16, 2015
I've been reading CLRS on and off for years. I read bits at a time and have been picking and choosing chapters to read and reread. I must say that without a doubt this is the best textbook I have ever read. I could not recommend it anymore for anyone that wishes to learn about data structures and algorithms well. The authors never skimp on the math and that's my favorite part of this book. Almost every idea that is presented is proven with a thorough proof. All of the pseudocode is completely golden and thoroughly tested. Read this, seriously.
Profile Image for Koen Crolla.
771 reviews205 followers
May 1, 2015
Some people just really enjoy typing, I guess. Not so much communicating, though: I was already pretty familiar with almost all of the algorithms and data structures discussed (the bit on computational geometry was the only thing that was completely new), but I can honestly say that if Introduction to Algorithms had been my first textbook, I wouldn't be.

(Also, I wish editors would stop writers when they try to use 1-indexed arrays in their books. Or, for that matter, pseudocode in general. Machine-interpretable, human-readable high-level languages aren't a new concept.)
Profile Image for Arif.
34 reviews4 followers
January 10, 2014
Well, technically I didn't finish reading all the chapters in the book, but at least I've read most of it. The topics in the book is well explained with concise example. But sometimes, I need to find out the explanation by myself, things that I found interesting but sometimes frustrating. If I run into this situation, sometimes I need to find another reference to help me understand the problem. But still, this is a good book.
Profile Image for Blog on Books.
268 reviews101 followers
July 26, 2010
Algorithms, which perform some sequence of mathematical operations, form the core of computer programming. Intended as a text for computer programming courses, especially undergraduate courses in data structures and graduate courses in algorithms, an “Introduction to Algorithms” provides a comprehensive overview, that will be appreciated technical professionals, as well.

The major topics presented are sorting, data structures, graph algorithms and a variety of selected topics. Computer programmers can draw desired algorithms directly from the text or use the clear explanations of the underlying mathematics to develop custom algorithms. The algorithms are presented in pseudocode that can be adapted to programming languages, such as C++ and Java. The focus is on design rather than implementation.

While a solid background in advanced mathematics and probability theory is needed to fully appreciate the material, non-programmers and IT professionals (such as this reviewer) will appreciate the numerous tips provided for improving the efficiency and thus reducing the cost of developing applications.

Any Computer Science student would find this text an essential resource, even if not specifically required for course work. However, the advanced mathematical principles needed to grasp the material are presented as exercises, intended to be worked through in class, so no solutions are provided, which may frustrate self-studiers and limit its utility as a reference. Although surprisingly well written, a book of this size and complexity is bound to have some errors. See http://mitpress.mit.edu/algorithms for the error list and supplemental information about the book (including solutions to some, but not all exercises, and an explanation of the corny professor jokes sprinkled throughout the text).
Profile Image for Wouter.
Author 2 books28 followers
April 29, 2018
It has ben 14 years since I touched a math-oriented theoretical work like this, and that hurt a lot while slogging through this textbook. After graduating a lot of the software engineering skills you pick up are geared towards practicality. I literally forgot some mathematical terms I had to look up again. Sadly, trying to understand it's lemma's with the help of the appendices is not doable as they are even heavier than the things they try to explain.
Besides that problematic point, it's an excellent guide (but not an introduction!) into algorithms & data structures including classic problems as sorting and searching with lists, trees, graphs and the like. Some extra background is provided along with alternatives that amused me after implementing the default solution. If you're not studying CS or you have but it was a long time ago, there might be better things to read. But it's still worth it.
Profile Image for Dmitry Kuzmenko.
2 reviews3 followers
November 19, 2010
The book gives a solid foundation of common non-trivial algorithms and data structures. It all comes with nice pseudocode, detailed walk-throughs and complexity analysis (along with worst case, average case and amortized complexity).

Personally I'd prefer to see the material in much more compact form, covering more of topics and more advanced or tricky algorithms and data structures. However, when something isn't clear, the detailed walk-throughs really help. Also, the exercises provided are invaluable.

I'd say is a must-read for every software engineer and computer scientist. If you aren't already familiar with the content from other sources, it's really worth investing a couple of years in it: read the book, try everything out with your favorite programming language and do exercises. Comparing to Knuth's "The Art of Computer Programming", it is a ten times easier read.
Profile Image for Mohammad Samiul Islam.
42 reviews4 followers
May 4, 2017
This books is amazing.

It's a bit hard for beginners, but then again, it's one of those books which you always have to come back to. Each time you come back, you learn something new. The exercises themselves have tons of stuff hidden in them. You need to be patient and learn slowly. Don't try to gobble everything up.

If you let go of your fear, and actually make an effort to learn something from it, you can learn loads. I learned Network Flow algorithm by reading this book. It took me few days, but I did manage to learn the algorithm myself by reading just this book.
Profile Image for Ashraf Bashir.
221 reviews126 followers
August 8, 2021
This book is miscalled an “introduction” to algorithms. It is not an introduction at all, it's a Bible on the topic! It requires an above-average mathematical background as well. It is very well explained in-depth, with more than enough explanation. A must-read for any professional software developer. Highly recommended!
54 reviews4 followers
February 8, 2010
The textbook on algorithms. It does not do a very good job of teaching how to design algorithms, but it is an authoritative catalog of algorithms for a wide variety of situations.
Profile Image for Emily.
13 reviews53 followers
December 14, 2021
Some days, it's the only sane source. Some days, it's too damn complex to make sense of.
August 15, 2022
Very vast coverage of the whole syallabus.
Great depth to the algorithm and more on thier proof.
Things that I really don't like times I feel I am not feeling algorithms book rather a mathematics book only. It should contain more colorful diagram somewhat less mathematics and more more problems related to computer science implementation of algorithms.
Because of the most of mathematical rigor sometimes you loose your enthusiasm to read algorithms.
But overall a good read.
Profile Image for Gabrielam13.
152 reviews27 followers
Read
February 23, 2024
M-am oprit la 10%. Nu este ceea ce m-am așteptat, conținând prea multă matematică. Uneori explicațiile matematice sunt destul de ușor de înțeles, alteori nu. Poate revin la ea pe viitor.
140 reviews
March 27, 2020
Used this while cramming for coding interviews.
5 reviews1 follower
March 3, 2009
Das Buch wurde uns zur Vertiefung zur Vorlesung "Algorithmen und Datenstrukturen" empfohlen. Da es kein Skript im klassischen Sinn gab (dafür eine Mailingliste und eingescannte Notizen des Dozenten), war das Buch somit meine Hauptinformationsquelle für die Nachbereitung nach der Vorlesung. Dabei hat sich das Buch als extrem hilfreich erwiesen, obwohl natürlich nur ein Bruchteil des Buches überhaupt behandelt wurde, da das den Rahmen des 1. Semesters mit Sicherheit gesprengt hätte. Dazu kommt noch, dass das Buch alle Themen sehr verständlich behandelt, aber trotzdem sehr viel tiefer geht, als ich es gebraucht hätte. Glücklicherweise sind die einzelnen Kapitel so gestaltet, dass sie nicht komplett gelesen werden müssen und auch nicht aufeinander aufbauen. Jedes Kapitel wird durch hervorragende Übungsaufgaben ergänzt, die bei den Hausaufgaben und der Klausurvorbereitung eine große Hilfe waren.

Insgesamt kann ich das Buch nur empfehlen. Nur zwei Wermutstropfen dämpfen das Vergnügen: Es ist selbst gebraucht so teuer, dass man sich einmal mehr mit der Bibliothek der Uni behelfen muss. Dabei dürfte es seine Stärke gerade als Nachschlagwerk im eigenen Regal ausspielen. Damit kommen wir zum 2. "Manko". Mit über 1000 Seiten ist es sehr viel umfangreicher, als man im 1. Semester brauchen wird. Wie bereits erwähnt stört das aber nicht wirklich.

Fazit: Großartiges Nachschlagwerk, jeden der sich mit Algorithmen beschäftigen möchte oder muss, sehr zu empfehlen
1 review
October 31, 2017
This is one of the worst college books I have ever used. The examples in the book are severely lacking the needed information to answer the questions in which you are forced to use outside resources aka other Data Structure books to find the info to solve their problems. It is amazing that this is an MIT book because it DOES NOT MEET THEIR STANDARD. The book is unorganized and bounces around like the authors have ADHD. The text is covering an extremely abstract computer algorithm theories and fails to provided the needed information to support understanding of the material.
Displaying 1 - 30 of 258 reviews

Can't find what you're looking for?

Get help and learn more about the design.