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
-
-
VIDEO -
Follow the authors
OK
Algorithms (4th Edition) 4th Edition
Purchase options and add-ons
This fourth edition of Robert Sedgewick and Kevin Wayne’s Algorithms is the leading textbook on algorithms today and is widely used in colleges and universities worldwide. This book surveys the most important computer algorithms currently in use and provides a full treatment of data structures and algorithms for sorting, searching, graph processing, and string processing--including fifty algorithms every programmer should know. In this edition, new Java implementations are written in an accessible modular programming style, where all of the code is exposed to the reader and ready to use.
The algorithms in this book represent a body of knowledge developed over the last 50 years that has become indispensable, not just for professional programmers and computer science students but for any student with interests in science, mathematics, and engineering, not to mention students who use computation in the liberal arts.
The companion web site, algs4.cs.princeton.edu, contains
- An online synopsis
- Full Java implementations
- Test data
- Exercises and answers
- Dynamic visualizations
- Lecture slides
- Programming assignments with checklists
- Links to related material
The MOOC related to this book is accessible via the "Online Course" link at algs4.cs.princeton.edu. The course offers more than 100 video lecture segments that are integrated with the text, extensive online assessments, and the large-scale discussion forums that have proven so valuable. Offered each fall and spring, this course regularly attracts tens of thousands of registrants.
Robert Sedgewick and Kevin Wayne are developing a modern approach to disseminating knowledge that fully embraces technology, enabling people all around the world to discover new ways of learning and teaching. By integrating their textbook, online content, and MOOC, all at the state of the art, they have built a unique resource that greatly expands the breadth and depth of the educational experience.
- ISBN-10032157351X
- ISBN-13978-0321573513
- Edition4th
- PublisherAddison-Wesley Professional
- Publication dateMarch 24, 2011
- LanguageEnglish
- Dimensions7.7 x 1.4 x 9.3 inches
- Print length976 pages
Frequently bought together

Customers who viewed this item also viewed
The primary purpose of static methods is to implement functions; the primary purpose of non-static (instance) methods is to implement data-type operations.Highlighted by 261 Kindle readers
An abstract data type (ADT) is a data type whose representation is hidden from the client.Highlighted by 247 Kindle readers
Indeed, when the number of inversions is low, insertion sort is likely to be faster than any sorting method that we consider in this chapter.Highlighted by 191 Kindle readers
From the Publisher
Distinctive Features
|
|
|
|
|
|---|---|---|---|
AlgorithmsDescriptions of algorithms are based on complete implementations and on a discussion of the operations of these programs on a consistent set of examples. Instead of presenting pseudo-code, Sedgewick and Wayne work with real code, so that the programs can quickly be put to practical use. Programs are written in Java, but in a style such that most of the code can be reused to develop implementations in other modern programming languages. |
Data typesSedgewick and Wayne use a modern programming style based on data abstraction, so that algorithms and their data structures are encapsulated together. |
ApplicationsEach chapter has a detailed description of applications where the algorithms described play a critical role. These range from applications in physics and molecular biology, to engineering computers and systems, to familiar tasks such as data compression and searching on the web. |
A scientific approachThe emphasizes developing mathematical models for describing the performance of algorithms, using the models to develop hypotheses about performance, and then testing the hypotheses by running the algorithms in realistic contexts. |
Breadth of coverage
Segewick and Wayne’s primary goal is to introduce the most important algorithms in use today to as wide an audience as possible. These algorithms are generally ingenious creations that, remarkably, can each be expressed in just a dozen or two lines of code. As a group, they represent problem-solving power of amazing scope. They have enabled the construction of computational artifacts, the solution of scientific problems, and the development of commercial applications that would not have been feasible without them.
They cover basic abstract data types, sorting algorithms, searching algorithms, graph processing, and string processing. They keep the material in algorithmic context, describing data structures, algorithm design paradigms, reduction, and problem-solving models. They cover classic methods that have been taught since the 1960s and new methods that have been invented in recent years.
Editorial Reviews
About the Author
Robert Sedgewick has been a Professor of Computer Science at Princeton University since 1985, where he was the founding Chairman of the Department of Computer Science. He has held visiting research positions at Xerox PARC, Institute for Defense Analyses, and INRIA, and is member of the board of directors of Adobe Systems. Professor Sedgewick’s research interests include analytic combinatorics, design and analysis of data structures and algorithms, and program visualization. His landmark book, Algorithms, now in its fourth edition, has appeared in numerous versions and languages over the past thirty years. In addition, with Kevin Wayne, he is the coauthor of the highly acclaimed textbook, Introduction to Programming in Java: An Interdisciplinary Approach (Addison-Wesley, 2008).
Kevin Wayne is the Phillip Y. Goldman Senior Lecturer in Computer Science at Princeton University, where he has been teaching since 1998. He received a Ph.D. in operations research and industrial engineering from Cornell University. His research interests include the design, analysis, and implementation of algorithms, especially for graphs and discrete optimization. With Robert Sedgewick, he is the coauthor of the highly acclaimed textbook, Introduction to Programming in Java: An Interdisciplinary Approach (Addison-Wesley, 2008).
Product details
- Publisher : Addison-Wesley Professional; 4th edition (March 24, 2011)
- Language : English
- Hardcover : 976 pages
- ISBN-10 : 032157351X
- ISBN-13 : 978-0321573513
- Item Weight : 3.02 pounds
- Dimensions : 7.7 x 1.4 x 9.3 inches
- Best Sellers Rank: #75,058 in Books (See Top 100 in Books)
- Customer Reviews:
Videos
Videos for this product

2:57
Click to play video

Algorithms, 4th Edition
Merchant Video
About the authors

Discover more of the author’s books, see similar authors, read book recommendations and more.

Robert Sedgewick (born December 20, 1946) is a computer science professor at Princeton University and a member of the board of directors of Adobe Systems.
Sedgewick completed his Ph.D. in 1975 under the supervision of Donald Knuth at Stanford. His thesis was about the quicksort algorithm. In 1975–85 he served on the faculty of Brown University.
Sedgewick was the founding Chairman (1985) of the Department of Computer Science at Princeton University and is currently still a Professor of Computer Science at Princeton. He was a visiting researcher at Xerox PARC, Institute for Defense Analyses and INRIA.
In 1997 Robert Sedgewick was inducted as a Fellow of the Association for Computing Machinery for his seminal work in the mathematical analysis of algorithms and pioneering research in algorithm animation.
Robert Sedgewick is the author of a well-known book series Algorithms, published by Addison-Wesley. The first edition of the book was published in 1983 and contained code in Pascal. Subsequent editions used C, C++, Modula-3, and Java.
With Philippe Flajolet he wrote several books and preprints which promoted analytic combinatorics, a discipline which relies on the use of generating functions and complex analysis in order to enumerate combinatorial structures, and to study their asymptotic properties. As explained by Knuth in The Art of Computer Programming, this is the key to perform average case analysis of algorithms.
He teaches four open online courses on the online learning platform Coursera, namely Algorithms Part I and Part II, Analysis of Algorithms and Analytic Combinatorics.
Bio from Wikipedia, the free encyclopedia.
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's algorithm introduction comprehensive, with lots of examples and code. They also say it's easy to read, concise, and well-written for learning purposes. Readers appreciate the interesting exercises provided at the end of each section. However, some find the subject interesting and fun, while others say it's boring. Opinions are mixed on the value for money, with some finding it worth every penny, while others say it is expensive.
AI-generated from the text of customer reviews
Customers find the book's algorithm introduction comprehensive. They appreciate the examples and code, as well as explanations for the theory. Readers say the author has a talent for simplifying complex concepts. They appreciate the right combination of mathematical treatment and practical applications. Additionally, they mention the book contains all the algorithms and datastructures for most job interviews.
"...The algorithms are updated to the basic algorithms a student these days needs to have heard of, which includes new material like tries...." Read more
"Clear explanations of each topic, code in java is easy to understand, book arrived in perfect conditions to Bolivia." Read more
"...It contains a large set of the basic algorithms that are frequently necessary on a day to day basis, but also shows HOW and WHY they were developed...." Read more
"...I feel like this book is great preparation for interviews, as well as for further study from books which use pseudo-code...." Read more
Customers find the Java snippets in the book very easy to read and understand. They say it's well-written for learning purposes and a reference. Readers also mention the book is organized well for segmented reading sessions and handles subjects step-by-step.
"...This code is so much better than any in the old C++ book. The authors preferred clarity, yet the code is still concise...." Read more
"Clear explanations of each topic, code in java is easy to understand, book arrived in perfect conditions to Bolivia." Read more
"...It is well written, and easy to understand (even for the interns I've had read through it)...." Read more
"...3 chapters so far, but I think I became better at writing cleaner, concise, and correct code by reading this book and doing some coding assignments..." Read more
Customers find the exercises in the book interesting. They say the explanations are clear and every chapter has many exercises. However, some readers feel the book is not for beginners.
"...Every chapter has many exercises (but not answers).Cons:1)Not for the beginners. I suggest learning Java (or C#) first...." Read more
"...It uses laudably-simple Java. The exercises are great. The diagrams are great. There are videos on Coursera if you want verbal explanations too...." Read more
"...It has then be updated and updated and updated. It's an interesting and fun subject, but the book is sooo boring to read and the mentality is the..." Read more
"This book explains this topic in such a beatiful way to make it extremely pleasant and exciting...." Read more
Customers have mixed opinions about the value for money of the book. Some mention it's worth every penny, while others say it's expensive and there's no way to upgrade from the basic version to video access.
"...Also i rented this book from amazon which I found to be very simple and cheap!" Read more
"Informative but dry, too expensive, and not enough complete use-case examples." Read more
"...Worth every dollar!" Read more
"...3. No way to pay for upgrade from basic version to video-access." Read more
Customers have mixed opinions about the code examples in the book. Some mention the examples are excellent, while others say they're overly complicated.
"...far, but I think I became better at writing cleaner, concise, and correct code by reading this book and doing some coding assignments..." Read more
"...the Kindle edition is less good for one reason: The code examples are almost unreadable...." Read more
"...The website has working code so you can actively learn from, with actual data to manipulate...." Read more
"...pros:Good examples drawn in charts or graphs, comprehensive codes.Free courses on Coursera.cons:..." Read more
Reviews with images
Great content. Printing could be better
-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
But what really impressed me was the code. This book shows the fundamental data structures and algorithms in just a few lines of beautiful and well-thought code. Sure, any nit-picker may find quibbles, but most choices are understandable from a didactic and printing perspective. This code is so much better than any in the old C++ book. The authors preferred clarity, yet the code is still concise. The authors are clear about feature creep, and limit their code to what is needed and no more, though some extensions are part of the exercises. I am reminded of the Einstein paraphrase "As simple as possible, but no simpler".
More complex data structures and algorithms need multiple code boxes, which are all explained in detail, with the box appearing close to the explanation. Some readers may take issue with the density of information in examples, but I find it advantageous to have all information close-by rather than spread out. I prefer to pore over their dense examples than having to flip pages.
I would heartily recommend this book to everyone. For the student to learn the basic set of algorithms, for the entry and mid level software engineers (or programmers) to inspire new ideas from a solid foundation, and for us veterans as a reminder to a solid way for development of our own algorithms.
It is well written, and easy to understand (even for the interns I've had read through it). The examples are developed around Java, and so the book starts with a section on Java and basic programming techniques. It contains a large set of the basic algorithms that are frequently necessary on a day to day basis, but also shows HOW and WHY they were developed. It also provides a section on several advanced topics, again with an eye to the HOWs and WHYs. All along the way, there are references to "Good" development foundations, and reminders the development philosophies.
The content itself is great, but I am deducting a point because of the print quality of the textbook. For some reason, a lot of the pages in my copy look grayer than they should. I'm not sure if it's a book formatting issue where the font color was set to gray accidentally or if it is a publisher issue, but for some pages the black text just doesn't appear as crisp and dark. I attached some pictures but my phone seems to color correct things and the difference in the photos doesn't seem big. In person, the variation in the black text throughout the book is definitely noticeable, though.
Reviewed in the United States on May 29, 2020
The content itself is great, but I am deducting a point because of the print quality of the textbook. For some reason, a lot of the pages in my copy look grayer than they should. I'm not sure if it's a book formatting issue where the font color was set to gray accidentally or if it is a publisher issue, but for some pages the black text just doesn't appear as crisp and dark. I attached some pictures but my phone seems to color correct things and the difference in the photos doesn't seem big. In person, the variation in the black text throughout the book is definitely noticeable, though.
Top reviews from other countries
There is also community driven GitHub repo containing answers to all book’s exercises.
The only thing that I didn’t like is the absence of unit tests.









