Book Review: Algorithms in C

Written by Robert Sedgewick, a computer science professor at Princeton University, Algorithms in C (link to Amazon) is a collection of two books (though there are more to come) covering the fundamental topics on computer science.

Right now it’s divided into five parts:

  1. Fundamentals
  2. Data Structures
  3. Sorting
  4. Searching
  5. Graphs

I just went through the first 4 parts, and I think it’s a very solid work. What I liked the most is the fact that some of the algorithms included are quite unique. That is, the concepts are the same (after all a quicksort is a always a quicksort), but the implementations tend to be quite elegant and to give you new ideas.

If you are just getting started the book will sure give you a solid foundation, and if you are an experienced programmer I think it could be useful as a reference as well.

Finally, part 5 about graphs is probably the strongest one. In fact the second book is entirely dedicated to it (while the first four parts are covered in the first book).

For example, I was working on a problem about topological sorting with graphs. As usual my first call was Introduction to Algorithms by Cormen et al, but to my surprise the section talking about topological sorting there was quite limited. On Sedgewick’s book, on the other hand, I found a lot of material on the topic and several implementations.

Highly recommended if you are looking for something covering all the fundamentals.

Leave a Reply
