Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Algorithms

Rate this book
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.

976 pages, Hardcover

First published January 1, 1983

838 people are currently reading
6,514 people want to read

About the author

Robert Sedgewick

81Ìýbooks83Ìý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,033 (57%)
4 stars
559 (30%)
3 stars
171 (9%)
2 stars
32 (1%)
1 star
13 (<1%)
Displaying 1 - 30 of 66 reviews
Profile Image for Ruxandra.
76 reviews1 follower
May 4, 2013
I bought this book for the course on coursera.org. I ordered it from informit and it arrived immediately.
It is a beautiful hardback edition, with ~950 fine quality pages and typography.

I love it, I used it a lot in my assignments and exercises, it is really clear and helpful, the index makes it very easy to find the answer to your questions.
The first part of the course covered half of it, and I will take the other part too, because the professor makes it really pleasant to study algorithms.
Profile Image for Ivan Atanasov.
115 reviews6 followers
December 4, 2015
The only reason not giving 5 starts is that the book is too much concentrated on Java programming language..
Profile Image for Borys.
110 reviews28 followers
January 10, 2014
First of all, the book has excellent and free site with exercises, presentations, and examples at which is great ! Then, there are 2 courses by prof. Sedgewick at Coursera, which is great also. There are lots of diagrams, and algorithm traces, and also lots of useful exercises to do by yourself.
Well, and what I don't like is that there are passages that go like 'this should be obvious from ...' and you're like 'What? Why this is obvious, it is not obvious for me at all !!!' But I think every book on algorithm has such passages. Other than that I like this text very much.

There are also minor drawbacks like, for instance, Java code doesn't always follow Java code style conventions, and maybe some other issues but they are not very important for me.

Of course, reading the book, and not doing any exercises is not very helpful but overall I got myself acquainted with lots of very elegant and beautiful ideas in the field of computer science and that was amazing.

P.S. And by the way, Kindle version has some errors and typos in it. Overall it's good, and it has nice code images that fit into one screen, but sometimes it's hard to identify errors, that's all.
AuthorÌý2 books7 followers
November 21, 2016
This is far more approachable than CLRS, yet more thorough than Skiena's The Algorithm Design Manual. It doesn't cover as much ground - certainly not when compared to CLRS. For instance, there is no mention of dynamic programming and no general discussion of greedy algorithms.

But what it does discuss is thoughtfully presented in a meaningful sequence so this can, and should, be read cover to cover. It seems like the product of someone who has considered the material deeply from several angles over many years. I knew most of the material already, but this book gave me several fresh perspectives and unexpected new insights.

The source code is Java, which I much prefer to the pseudo code in CLRS or the C in Skiena's book. However, the first 200 pages or so are a rather dry introduction to Java which doesn't really belong in an algorithms book and which most people can skip. The Java in the book is very simple and it's not unreasonable to expect everyone to know that much Java already.

Oddly, the authors avoid using big-O notation, often discussing constant factors that don't seem like they could be particularly relevant compared to how CPU memory cache behaviour (data locality) would affect efficient implementations of different algorithms, particularly as the code is in Java.

Though the graph section mentions the Ford-Fulkerson Max-Flow algorithm, it doesn't mention the all-pairs shortest paths algorithms such as Floyd-Warshall, usually dealt with first - maybe because it belongs in a discussion of dynamic programing.

It does have some excellent explanations of the Knuth-Morris-Pratt, Boyer-Moore and Rabin-Karp algorithms for substring search, explaining them in terms of deterministic finite state automata. That leads to a really good section on implementing regular expression searches with non-deterministic finite state automata. These really expanding my mind.
Profile Image for Gabriel.
15 reviews1 follower
May 17, 2013
I read this textbook while taking Sedgewick's online Algorithms class on coursera.com. It covers the fundamental algorithms in searching, sorting, graphs, and string processing. There's a consistent focus on application examples, which really helps provide useful context. I found the explanations very clear and easy to follow.
A strength of the book is that all algorithms are given in real working Java code, and great care has been given to making the code concise and readable. This can also be seen as a weakness, as large portions of the book are devoted to introducing a basic Java programming model, and to discussing specific Java implementation details. As someone who writes code for a living, I really appreciated this aspect of the presentation, but I could understand if someone else found it distracting.
Overall, this is an excellent work for learning the fundamental algorithms of computer science from a very practical and applications oriented perspective. Highly recommended.
Profile Image for Tony Poerio.
212 reviews13 followers
May 6, 2016
A friend of mine calls Sedgewick his "CS Yoda". Not sure if I totally agree--BUT, I used this book for a class on Algorithms and would recommend. The material isn't easy (and some of it is dry), but Sedgewick is an extraordinarily clear writer, and his code snippets are instructive for gaining the necessary intuition to start using these algorithms in practice. There are many, many books on algorithms out there, and if you're not sure which to use, the choice can be kind of paralyzing. That said, you can't go wrong with this one. Would also recommend checking out his online materials for extra info:
Profile Image for David.
6 reviews1 follower
December 10, 2021
The second edition is very well written, doesn't get caught up in language specifics, and is a must read for anyone serious about programming or computer science.

Unfortunately future editions seem to devolve into the obsession with Java language implementation that is a plague on many modern algorithms textbooks. If you've found a second hand copy, flip through a bit and see if anyone is gushing over automated garbage collection, and run away if it's getting in the way of content.
Profile Image for Amr Wahby.
29 reviews7 followers
September 28, 2013
the book is good, and discuss the topic in easy way , but it dont have evrey thing and need mor example.
Profile Image for Alexander.
67 reviews66 followers
June 12, 2022
I loved that:

1. This book used Java instead of some weird language like Lisp, Pyret, Oz or pseudocode. Java is simple, straightforward, ubiquitous and has a colossal community.
2. The word "lemma" doesn't appear anywhere in this book, and there are no pages that consist purely of opaque mathematical proofs. This book focuses on intuition, not rigorous proofs.
3. This book's illustrations are beautiful and aid with understanding.
4. This book focuses entirely on providing students with a solid foundation. It skips specialised topics like dynamic programming, quantum algorithms and machine learning, which some other algorithms books use as marketing gimmicks.

This is a high-quality book on computing that I highly recommend.
1 review
February 5, 2017
Fundamental basic algorithm book. Must read for new programmers that want to get more advanced. Definitely a classic book for starters and one of the most traditional stepping stones to bigger things.
Profile Image for Grzegorz Szopinski.
49 reviews1 follower
October 26, 2021
If you're a java person nad want to learn algorithms in linear, structured way this is a really good book. To some extent you can use it with other languages (e.g. with c#, like I did), but in such case getting pseudocode-based book on the subject seems to be a better idea.
Profile Image for Dmitry Anoshin.
8 reviews
December 22, 2020
Very comprehensive textbook on algorithms and data structures. I've read the whole book. Sometimes it was hard to comprehend and I had to re-read few parts. But I really enjoyed reading it. Strong five stars and highly recommended.
Profile Image for Teejay.
156 reviews
May 3, 2022
This should probably be three stars, but I just can't make myself say "I liked it" because it's attached to the worst class I've ever taken. The book is fine and presents Algorithms in a decent way. The companion videos are very helpful for breaking down the examples. But this is material that I would only read if I were taking a class for it or was a hardcore programmer.
Profile Image for Rabib.
14 reviews
June 19, 2020
Together with the corresponding course, I gained a wealth of knowledge concerning algorithms and data structures. The book will serve as a useful reference going forward.
15 reviews11 followers
February 13, 2017
It is a very catchy book. The explanation schema chosen by the authors is very good - a problem definition, a problem solution (algorithm overview), an application of the solutions, a summary/comparison of the approaches, and a brief history (sometimes). I think, the context of ideas (algorithms) is as important as the ideas (algorithms) themselves. Nowadays, there exist many ("documentation-driven") (text)books. However, I think that a modern textbook should give to readers not only the description, but also the context (history, application and so on). And so this is a great merit for the book.

On the other hand, main flaws are that several interesting problems are left as exercises and the concept of balanced search trees is explained very poorly. I think, BST could be explained more generally and so Red-Black trees, Splay trees, or AVL trees will be just an example how the general approach should be used. I also do not like that Red-Black trees are the only approach that is explained in more detail.
2 reviews
October 19, 2017
This is essentially the greatest Algorithms Text ever. Cormen( ) is wide in breadth but not deep enough. Chapters finish too soon without exploring and investigating the data structure properly, and running after other, more advanced structures.

This book is thorough. The chapters on Red-Black trees (which come after introducing 2-3 Trees, as it should) and on Graphs are the best you can find in the world.
Profile Image for Taj Bortz.
24 reviews1 follower
December 19, 2024
This book is a great book for not only algorithms, but it takes the time to give you a much greater understanding of many basics of programming. I loved the writing style, the pace, the content. They build up, so you will profit most by reading it cover-to-cover.

This is mostly using Java, so it is especially wonderful for a Java developer. But the topics are generally universal, so don't let that keep you from reading it.
Profile Image for Kaung Si Thu.
6 reviews1 follower
June 6, 2019
I read this book together with Mark Allen's C++ data structures and algorithm analysis book. And I would say this book has more visual materials for explanations on algorithms. No fancy functions for codes, just readable and clean ones. So, unlike Mark's C++ version, u might not want to use this book to study current(somewhat) ways to write languages but to see the topics more.
Profile Image for Krzysztof.
82 reviews
March 24, 2023
I can honestly say that this was the first textbook I ever carefully read almost from cover to cover. An extremely helpful book with handy examples, breakdowns and implementation discussions covering every single detail you can think of when implementing algorithms. It takes some time, but it's... heck, it's pleasant!
Profile Image for Kasra.
11 reviews10 followers
August 6, 2016
One of the bests in this realm.
Profile Image for Abdellah.
24 reviews1 follower
March 5, 2023
"Algorithms" is a comprehensive textbook on algorithms and data structures, written by one of the leading authorities in the field, Robert Sedgewick. The book provides a detailed and rigorous treatment of the subject matter, while still being accessible to a wide audience, including students and professionals in computer science and related fields.

The book covers a wide range of topics, including fundamental algorithms and data structures, graph algorithms, string processing, sorting and searching, and algorithm analysis. Each topic is presented in a clear and concise manner, with numerous examples and exercises to reinforce the material.

One of the strengths of the book is its use of Java code to illustrate the algorithms and data structures. The code is easy to read and understand, and provides a practical context for the theoretical concepts being presented. In addition, the book includes numerous visualizations and animations to help readers understand the algorithms and data structures in action.

Overall, "Algorithms" is an excellent resource for anyone looking to deepen their understanding of algorithms and data structures. The book is well-written, comprehensive, and accessible, making it a great choice for both students and professionals. Whether you're studying computer science, programming, or just interested in learning more about algorithms and data structures, this book is definitely worth checking out.
Profile Image for Dominic Bor.
16 reviews
December 13, 2024
This is the definitive textbook on algorithms that manages to strike a rare balance between theoretical depth and practical implementation. Sedgewick's approach of using Java to illustrate concepts makes the material immediately applicable, unlike many algorithm books that rely on pseudocode alone.

The book's greatest strength is its methodical progression through fundamental data structures and algorithms, with each concept building naturally upon previous ones. The discussions of red-black trees, graph algorithms, and string processing are particularly well-crafted. The included visual representations and animations (available through the book's companion website) make complex concepts significantly more digestible.

While the Java focus is helpful for practical implementation, it might be slightly limiting for readers looking for a completely language-agnostic treatment. Additionally, some advanced topics like network flow algorithms and linear programming get relatively brief coverage compared to the core material.

What sets this book apart is how it connects theoretical computer science with practical programming concerns like performance analysis and optimization. The exercises are thoughtfully designed to reinforce understanding rather than just test memorization.

An essential reference for both students and practicing developers, though beginners might find it challenging without some programming background.
1 review
September 23, 2022
It has been quite an enjoyable experience. A bit slow paced on some really basic things. I started after my studies in CS so most of it has been just a refresh of some fundamentals.

Good if you have already some knowledge of Programming. Examples and algorithms are presented in Java but it is quite easy to follow even for non-Java programmers.

A lot of exercises are available and it opens up many possibility with creative programs and additional challenges for every topic.

It is quite remarkable that every algorithm presented in the book has a proved time and space estimation.

A must when somebody wants to start a deep dive into the details of how things work in well known API.
Profile Image for Nimrod Daniel.
180 reviews297 followers
December 27, 2016
It's a great comprehensive book about algorithms. The book contains a full implementation in java code, plus there's also a book site where you can find more code and supplemental material.
The explanations are clear and accompanied by examples that demonstrates how the algorithms work.

It's a long book, though it can be read in a very reasonable time. I was ~80% through after about a month or two (more like two I believe), but then I barely touched that for a long time.

A very informative and practical book which is highly recommended to anyone who's interested in CS.
4.5-4.75

Displaying 1 - 30 of 66 reviews

Can't find what you're looking for?

Get help and learn more about the design.