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.)