
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Image Unavailable
Color:
-
-
-
- To view this video download Flash Player
Follow the author
OK
Introduction to Algorithms, fourth edition 4th Edition
Purchase options and add-ons
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 learning
- New material on topics including solving recurrence equations, hash tables, potential functions, and suffix arrays
- 140 new exercises and 22 new problems
- Reader feedback–informed improvements to old problems
- Clearer, more personal, and gender-neutral writing style
- Color added to improve visual presentation
- Notes, bibliography, and index updated to reflect developments in the field
- Website 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.
- ISBN-10026204630X
- ISBN-13978-0262046305
- Edition4th
- PublisherThe MIT Press
- Publication dateApril 5, 2022
- LanguageEnglish
- Dimensions8.38 x 2.25 x 9.31 inches
- Print length1312 pages
Frequently bought together

Customers who viewed this item also viewed
- A data structure is a way to store and organize data in order to facilitate access and modifications.Highlighted by 104 Kindle readers
- The running time of an algorithm on a particular input is the number of instructions and data accesses executed.Highlighted by 97 Kindle readers
- Machine learning can be thought of as a method for performing algorithmic tasks without explicitly designing an algorithm, but instead inferring patterns from data and thereby automatically learning a solution.Highlighted by 95 Kindle readers
Editorial Reviews
About the Author
Product details
- Publisher : The MIT Press; 4th edition (April 5, 2022)
- Language : English
- Hardcover : 1312 pages
- ISBN-10 : 026204630X
- ISBN-13 : 978-0262046305
- Item Weight : 2.31 pounds
- Dimensions : 8.38 x 2.25 x 9.31 inches
- Best Sellers Rank: #16,491 in Books (See Top 100 in Books)
- #1 in Computer Algorithms
- #2 in Programming Algorithms
- #5 in Computer Programming Languages
- Customer Reviews:
About the author

Charles E. Leiserson is Professor of Computer Science and Engineering at the Massachusetts Institute of Technology.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book excellent for explaining algorithms and consider it a Bible in computer science, though some find it too difficult to read. The fourth edition features colored illustrations and shiny pages, and customers appreciate its value for money, with one noting it's available for free online. One customer reports issues with pages being upside down.
AI-generated from the text of customer reviews
Select to learn more
Customers find the book delightful to read and consider it worth the price, with one mentioning that the ebook version is available for free online.
"...It's still very readable as long as you know your stuff, just don't go in expecting intro level material...." Read more
"...It explains complex topics very well and is a great book for those of us CS majors who don't immediately understand algorithms...." Read more
"...This is the best book in the field. Authors also reachable and helpful as and when needed...." Read more
"This book is by far the definitive book and resource for anything and everything algorithm related...." Read more
Customers appreciate the colored illustrations and shiny pages in this edition of the book.
"...The printing (at least the hard cover) is very high quality, full color, glossy pages...." Read more
"...Apart from that, you have colored illusrtations in this edition...." Read more
"...It's right as advertised. The pages are really shiny, there nice-looking illustrations...." Read more
"...different in size but the printing is better, the illustrations are in color..." Read more
Customers have mixed opinions about the book's algorithm content, with some finding it excellent for explaining algorithms and considering it a Bible in computer science, while others find it too difficult to read and not suitable for beginners.
"...This covers virtually every common algorithm, and even includes mention and brief discussion of rare algorithms and variations of common algorithms...." Read more
"...It explains complex topics very well and is a great book for those of us CS majors who don't immediately understand algorithms...." Read more
"The bible for learning algorithms. Highly recommended for anyone who is serious in learning algorithms. Concepts are clearly explained with proofs...." Read more
"...Introduction to Algorithms" is basically the big encyclopedia of algorithm. It's got everything from the simple stuff to the mind-bogglingly complex...." Read more
Customers report issues with the book's pages being upside down.
"In my book, groups of pages were flipped upside down and put in backwards. This happened a few times throughout the book...." Read more
"Found pages 203 to 214 upside down and backwards. Pages up to 202 and past 215 correct." Read more
"...There are pages in the book that are upside down, and in a reverse order. I love the book itself but the product quality is pathetic." Read more
"PAGES UPSIDE DOWN AND REVERSED IN ORDER..." Read more
Reviews with images

Amazing quality and quantity. (
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on July 28, 2024This is an extremely high quality formal academic textbook on the subject of algorithms in computer science. This book likely gets assigned in many upper division or graduate level classes on the subject. For example, it has formal academic proofs of all of its claims about algorithms up front, and it is filled with exercises that are clearly intended to be completed by students. This is a formal and rigorous high level academic textbook, really serious stuff.
The pseudo code is excellent, top notch, it makes even very complex algorithms readable. The pseudo code is close-ish to python in style, but the discussion of the algorithms more broadly is clearly written by people coming from a background in C/C++ since they reference pointers frequently during their explanations. The pseudo code is good enough that it could likely be used as is.
The book I got was clearly freshly printed, it smelled as though the ink had just dried and one of the pages still needed to be separated at the bottom from another. So if you buy new, you might get a book that has just been printed, which is pretty cool. The printing (at least the hard cover) is very high quality, full color, glossy pages. There are some minor printing mistakes, but this is like a 1000+ page book, so the fact that 99% of it is perfect is pretty awesome.
This covers virtually every common algorithm, and even includes mention and brief discussion of rare algorithms and variations of common algorithms. It's 1000+ pages, and I get the feeling that they packed in as much as they possibly could.
I would love if they would release a second volume because they just didn't have room here to discuss everything. Like they mention a ton of variations of algorithms that they just don't have the time to explore. For example, I'd love to have a whole section dedicated to self balancing binary trees. They cover the most common self balancing binary tree algorithms, but they briefly mention and discuss at least 5-10 other related algorithms that I would love to see covered in depth.
Likewise, I would love for a second volume to cover computational geometry, which is absent from this book. I totally get why they didn't include it, it's a whole field in and of itself, and this book is already 1000+ pages, and this book covers almost literally every other major algorithm and problem. That's why I hold out hope, not for a revised edition, but for a second volume that covers the stuff that this one didn't have time for.
This book is a formal academic textbook. It's not an intro level text. You need to know your stuff before reading it. It doesn't try to be particularly easy to read, but nor does make the subjects seem overly complex. It's just a rigorous academic look at algorithms, like you'd expect in an upper level college course. Could it be written in a simpler style? Sure, but I feel like the market for this book is classrooms and academics, that kind of thing. It's still very readable as long as you know your stuff, just don't go in expecting intro level material. This is the opposite of intro level.
If you are a software engineer, you pretty much owe it to yourself to own this book. This is the definitive textbook on the subject of algorithms. I really, really hope they release a second volume that covers all the algorithms that they only mention in this work. This work is very comprehensive, don't get me wrong. It covers pretty much every major algorithm that you'd want to know, with the obvious exception of computational geometry. It even covers the NP-Hard problems, it really is comprehensive. I just want all the more obscure algorithms too!
Publishers and authors if you're listening, please release a second volume of this awesome book that covers everything you couldn't fit in this one!
- Reviewed in the United States on February 8, 2025I'm taking a computer algorithms class from a professor who actually wrote a book on algorithms. It's tough and I'm super confused. I got this Intro to Algorithms textbook to help explain what the professor thinks is obvious. This book has been really helpful. The book is huge and it covers a lot but it doesn't assume you already know the material the way a lot of other algorithm textbooks do. It explains complex topics very well and is a great book for those of us CS majors who don't immediately understand algorithms. I recommend this book even if you don't have to get it just as a reference for computer science majors. Understanding algorithms is critical for computer science jobs, if just to get past the interview stage and get a job, so I'm glad to have this book as a reference.
- Reviewed in the United States on March 16, 2025Like to be back in college Computer Science advanced. Great updated material. Couldn’t find a better book on the subject.
- Reviewed in the United States on January 17, 2023The bible for learning algorithms. Highly recommended for anyone who is serious in learning algorithms. Concepts are clearly explained with proofs. Exercises and chapter end problems were really interesting and challenging, guiding students to think algorithmically. This is the best book in the field. Authors also reachable and helpful as and when needed. Some of the mathematical contents used in the proofs are clearly explained in the Appendix section.
Just writing some code to solve the problem is not sufficient at all. We should be able to solve the problem optimally, thinking out of the box while challenging the orthodox thinking and proving the correctness and analyzing the running time of the solution mathematically. This book covers all of them in one go.
However, there's a public controversy claiming that this edition is not significantly different from the previous one. In fact, the differences from the previous edition are clearly stated at the beginning of the book. As of my observation thus far, it is significantly different from the previous edition. They have introduced many new exercises and chapter end problems while removing just a few of them. The contents in elementary graph algorithms are slightly different as they are phrased differently from the previous one. Greedy algorithms chapter has significant changes. Apart from that, you have colored illusrtations in this edition. So, after all, there's a significant difference from the previous edition as of my observation.
The only downside I see is in the binding which is not that good in the fourth edition compared to the previous third edition. Nevertheless, It's well worth the payoff ! Go ahead and read it without any hesitations !
- Reviewed in the United States on October 5, 2023My experience with this book suggests that the mathematician Niels Abel was right when he counseled to ”Learn from the masters, not the pupils.”
Where this book’s material overlaps with Knuth’s “The Art of Computer Programming”, the latter repeatedly shows itself superior. For example, in explaining binary trees, Knuth discusses at length what they are, how they differ from general trees, how they can represent general trees, how one can traverse them without recursion (preorder vs. inorder vs. postorder), and how one can tweak them for various gains in performance. CLRS just barely (or doesn’t) touch on these fundamental topics. Which raises the question who exactly this book is for — the introduction suggests it is for new-ish students, yet here they are expecting said students to intuit what Knuth dedicates multiple chapters to in TAOCP.
And the rest of the book, or the parts I’ve read so far anyway, seem like that. Spotty exposition, leaving readers to scratch their heads over what are really the authors’ failures to properly introduce and expound on a subject in a nice and coherent way. Written by people who profess to understand what they write about, but who evidently lack the style and grace of a true master.
Top reviews from other countries
- Nuno C. InácioReviewed in Spain on September 13, 2022
5.0 out of 5 stars One of the greats
This book is often hailed as "The" algorithm book, and with good reason. It has been on my wish list ever since I saw it at my uni's library some 20+ years ago. With the 4th edition having been recently launched I finally decided to buy it.
It combines a good variety of algorithms with rigorous mathematical analysis of said algorithms. It will teach you how algorithms are developed and how to analyze an algorithm's performance.
I would not recommend this for someone who is beginning their programming journey. There are other books and online resources which are more suited for a beginner who just wants to learn some algorithm programming without all the math stuff.
This works great as a reference, although nothings stop you from reading it back to back. But it will take a long time, particularly if you invest yourself into understanding all the underlying details.
Nuno C. InácioOne of the greats
Reviewed in Spain on September 13, 2022
It combines a good variety of algorithms with rigorous mathematical analysis of said algorithms. It will teach you how algorithms are developed and how to analyze an algorithm's performance.
I would not recommend this for someone who is beginning their programming journey. There are other books and online resources which are more suited for a beginner who just wants to learn some algorithm programming without all the math stuff.
This works great as a reference, although nothings stop you from reading it back to back. But it will take a long time, particularly if you invest yourself into understanding all the underlying details.
Images in this review
- Priyanshu PatidarReviewed in India on April 11, 2025
5.0 out of 5 stars A Must-Read for Anyone Interested in Algorithms
I recently started reading this book, and it has proven to be an invaluable resource for enhancing my understanding of algorithms.
Positive:
This book is exceptionally well-organized and covers a wide range of topics related to algorithms, making it suitable for both beginners and experienced programmers. The explanations are clear and detailed, accompanied by practical examples that help clarify complex concepts. The authors do a great job of breaking down algorithms into manageable parts, making it easier to grasp how they function and where they can be applied.
The exercises at the end of each chapter are particularly beneficial for reinforcing the material and testing your understanding. The book strikes a good balance between theoretical insights and practical applications, providing a well-rounded perspective that is advantageous for anyone looking to enhance their programming skills.
Additionally, its comprehensive nature makes it an excellent reference for future projects. Whether you're studying for exams or addressing real-world programming challenges, this book is a valuable addition to your library.
Overall:
"Introduction to Algorithms" is a highly recommended resource for anyone interested in computer science and programming. Its depth, clarity, and practical approach make it essential for mastering algorithms.
- mikael englundReviewed in Sweden on July 10, 2024
1.0 out of 5 stars Illegal print
Do not buy this is illegal product much smaller than it supposed to be less pages and lots of weird fonts and double print and bad pages.
This is stolen from mit press and Amazon should be ashamed to sell this. I asked for a legitimate copy but Amazon refuses
mikael englundIllegal print
Reviewed in Sweden on July 10, 2024
This is stolen from mit press and Amazon should be ashamed to sell this. I asked for a legitimate copy but Amazon refuses
Images in this review
-
gr3gory 😜Reviewed in France on October 3, 2022
5.0 out of 5 stars Une référence
Une référence en la matière mais il est bon de savoir que les maths vous seront utiles pour en tirer pleinement partie
- elcinReviewed in Germany on April 22, 2022
1.0 out of 5 stars It is an amazing book but this edition printed wrong
The book just arrived. There is a problem with the printing of the book. I will return it.
elcinIt is an amazing book but this edition printed wrong
Reviewed in Germany on April 22, 2022
Images in this review