[ ... ]
Interesting. I learned algorithms from Wirth---the second
edition, which used Modula 2 for examples. Except for very poor
typography (a whole line dropped in one example program, for
example), I found it excellent. But I have Sedgewick as well
(the C version), and I have no real complaints. It's more
complete (i.e. covers more algorithms) than Wirth, even if the
explinations aren't nearly as clear. Knuth is, of course, the
absolute reference, but 1) it's dated (or at least the editions
I have are), and 2) the sample code is in assembler, which makes
it somewhat more difficult to follow on the whole. (On the
other hand, the descriptive text is about the best you can
imagine. Knuth is one of those rare people who are both a
technical genius and a genius with words.) The result is that
while I have all three, when I need to look up a standard
algorithm quickly, I'll go to Sedgewick first.
That's largely why I posted a link to the entire thread instead of only
to one of my own posts -- while I think his books are quite poor, there
are clearly others who disagree, and I didn't want to give the
impression that my own opinion was the only correct one, or anything
like that.
To some degree any book on algorithms and data structures is something
of a tradeoff between depth of coverage, breadth of coverage, and sheer
size of book. Perhaps rather than a simple "I recommend [for|against]
this book, it would be more useful to attempt to rate the books on a
number of dimensions, and let the reader draw their own conclusions.
K = _The Art of Computer Programming_, Donald Knuth
C = _Introduction to Algorithms_, Cormen, Lieserson, Rivest and Stein
W = _Algorithms + Data Structures = Programs_, Niklaus Wirth
S = _Algorithms {in [C|C++]}_, Robert Sedgewick
V Area \ Book -> K C W S
Depth of coverage 10 8 6 2
Breadth of coverage 5 10 4 8
Clarity of text 10 8 9 3
Approachability 3 5 10 6
Of course, these are my subjective opinions (on a relative scale of 1-
10, in case that wasn't obvious). I certainly don't mean to imply that
they're right and everybody else's opinions are wrong. Rather, my point
here is mostly to provide at least some attempt at information about the
books themselves, separate from my opinion about the relative importance
of each area. I think James and I probably agree for the most part about
the ratings of the books in the individual areas, and mostly differ in
the importance we attach to those areas.
Likewise, if anybody wants to suggest things like 1) different areas to
consider/rate, 2) different ratings for each area, or 3) ratings for
more books, those would undoubtedly be useful additions -- perhaps we
can turn this thread into a source of helpful guidance instead of mostly
unexplained opinions.