Conventions Used in This Book

The following typographical conventions are used in this book:


All code examples appear in this typecase.

This code is replicated directly from the code repository and reflects real code.


Indicates key terms used to describe algorithms and data structures. Also used when referring to variables within a pseudocode description of an example.

Constant width

Indicates the name of actual software elements within an implementation, such as a Java class, the name of an array within a C implementation, and constants such as true or false.

Small Caps

Indicates the name of an algorithm.

We cite numerous books, articles, and websites throughout the book. These citations appear in text using parentheses, such as (Cormen et al., 2001), and each chapter closes with a listing of references used within that chapter. When the reference citation immediately follows the name of the author in the text, we do not duplicate the name in the reference. Thus, we refer to the Art of Computer Programming books by Donald Knuth (1998) by just including the year in parentheses.

All URLs used in the book were verified as of August 2008 and we tried to use only URLs that should be around for some time. We include small URLs, such as, directly within the text; otherwise, they appear in footnotes and within the references at the end of a chapter.

Get Algorithms in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.