irotas |
29/08/2006
Absolutely the best C++ DS&A book
On my bookshelf right now I have 13 books on DS&A using C++. Every time I am in need of a new type of data structure or algorithm, and quickly scan through each of them to determine which seem to have the most relevant information, and also which have useable source-code. Drozdek's book is almost always the book I end up selecting to learn a new topic.
Without a doubt, Drozdek's DS&A book is the most complete and well-written of its kind. It includes a chapter of graphs, which many books surprisingly omit. Also, as of the 3rd edition, it includes a chapter on string matching. As far as I know, this is the *only* C++ DS&A book to dive into this subject.
Surprisingly (because of such a broad-scoped book), the material presented in the string matching chapter is modern and incredibly useful. I found the coverage of suffix tries to be excellent. According to Professor Drozdek (via email correspondence), this chapter is actually a compressed version of what was to be an entire C++ book on string matching. Apparently no publisher would touch such a 'specialized' book. How short-sighted of them!
I work in a research-intensive company focused on developing cutting-edge algorithms to solve difficult modern problems. We do the majority of our coding in C++, which is what originally attracted me to Drozdek's book. Since then, I have referred several colleagues to this book, all of which now use it regularly and are loving it.
My only complaint about this book is that it doesn't discuss primality or random-number generation at all. So many algorithms rely heavily on one or both of these, so I find it strange that this book (and most others) completely ignore them.
As for the reviewer who negatively commented "worst written educational book I have ever read", this person obviously bought Drozdek's book expecting to learn C++ and not DS&A. If you're looking to learn C++, I recommend "C++ Primer Plus (5th Edition)" maligned publisher, it really is an excellent book for learning C++ (and also as a reference for an experienced programmer).
Depending on your needs, you might look into supplementing Drozdek's book with Robert Sedgewick's books 'Algorithms in C++'. His books do not go as deep as Drozdek does, but he provides an enormous number of fully implemented algorithms that don't exist in any other C++ DS&A book. Be sure to get the 3rd edition; it is much improved over the 2nd.
Here's a complete TOC of Drozdek's book (3rd edition):
Table of Contents
1. Object-Oriented Programming Using C++
2. Complexity Analysis
3. Linked Lists
4. Stacks and Queues
5. Recursion
6. Binary Trees
7. Multiway Trees
8. Graphs
9. Sorting
10. Hashing
11. Data Compression
12. Memory Management
13. String Matching
Appendices
A: Computing BIG-O
B: Algorithms in the Standard Template Library
C: NP-Completeness