This revision adds a new chapter examining advanced data structures and their implementation such as red black trees, top down splay trees, treaps, k-d trees and pairing heaps, among others. In addition, the author has refined the presentation, made all code examples conform to standard C programming style conventions, and strengthened the coverage of formal proofs.