This book is intended both for novices interested in finding out about
binary search trees and practicing programmers looking for a cookbook of
algorithms. It has several features that will be appreciated by both
- Tested code: With the exception of code presented as
counterexamples, which are clearly marked, all code presented has been
tested. Most code comes with a working program for testing or
- No pseudo-code: Pseudo-code can be confusing, so it is not used.
- Motivation: An important goal is to demonstrate general methods for
programming, not just the particular algorithms being examined. As a
result, the rationale for design choices is explained carefully.
- Exercises and answers: To clarify issues raised within the text,
many sections conclude with exercises. All exercises come with complete
answers in an appendix at the back of the book.
Some exercises are marked with one or more stars (*). Exercises
without stars are recommended for all readers, but starred exercises
deal with particularly obscure topics or make reference to topics
Experienced programmers should find the exercises particularly
interesting, because many of them present alternatives to choices made
in the main text.
- Asides: Occasionally a section is marked as an “aside”. Like
exercises, asides often highlight alternatives to techniques in the
main text, but asides are more extensive than most exercises. Asides
are not essential to comprehension of the main text, so readers not
interested may safely skip over them to the following section.
- Minimal C knowledge assumed: Basic familiarity with the C language
is assumed, but obscure constructions are briefly explained the first
time they occur.
Those who wish for a review of C language features before beginning
should consult [Summit 1999]. This is especially recommended
for novices who feel uncomfortable with pointer and array concepts.
- References: When appropriate, other texts that cover the same or
related material are referenced at the end of sections.
- Glossary: Terms are emphasized and defined the first time they
are used. Definitions for these terms and more are collected into a
glossary at the back of the book.
- Catalogue of algorithms: See Catalogue of Algorithms, for a handy
list of all the algorithms implemented in this book.