**Algorithms** — Robert Sedgewick and Kevin Wayne, Addison-Wesley 2011 (4th ed.), ISBN 978-0-321-57351-3

This single volume replaces Sedgewick’s two-volume classic *Algorithms in C/C++/Java* (long among my favorite programming books), now without the language designator since Java is used exclusively. The associated booksite offers a chapter overview, excerpts from the printed text, dynamic visualizations, some exercise solutions, and all Java code for download.

The book’s content is largely identical to the previous edition, except rearranged and somewhat enhanced. The total page count shrank from 1,234 to 955 pages, but this is offset by a greater line width (3rd ed. had extremely wide margins). As before, topics include general data structures, sorting & searching, and graph algorithms. Of the originally planned third volume on strings, computational geometry, and advanced algorithms & applications, strings and applications do appear as new chapters, but reuse some existing material such as radix search and B-trees. Computational geometry was dropped altogether, except for a few code samples.

At present I’ve only used the third edition extensively, so my recommendation is based on that and a first impression of the new edition. *Algorithms in Java* was my standard reference for basic algorithms thanks to Sedgewick’s lucid and practical explanations, lavish visualizations of run-time behavior, and of course the ready-to-run code snippets. The extensive mathematical analyses that haunt other algorithmics textbooks are blissfully absent – Sedgewick stays focused on the needs of implementors. Sadly, the fourth edition was published with numerous printing errors so I strongly suggest going through the list of errata before you begin using this book.

(See Developer Books for my complete review archive.)

*Related*

Hong OoiSweet, didn’t know it had an update. I’ve still got the 3rd (?) edition somewhere in a box in Sydney — I remember it well, because it’s where I got a minimal-spanning-tree algorithm for my thesis. Sedgewick’s book, along with Nocedal and Wright’s _Numerical Optimization_, are two of the textbooks I really enjoyed.

cnahrI didn’t find out about the new edition myself until a few weeks ago! I had been looking for that elusive third volume on strings etc. which is listed on Amazon to this day (as “unavailable”, with an imaginary 2008 publication date). Eventually I noticed some strange new book simply titled “Algorithms”, and sure enough that was the unexpected 4th edition…