O'Reilly logo

Algorithms in a Nutshell by Gary Pollice, Stanley Selkow, George T. Heineman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Algorithm Pattern Format

Each algorithm is presented using the following pattern sections:

Name

A descriptive name for the algorithm. We use this name to communicate concisely the algorithm to others. For example, if we talk about using a Sequential Search, it conveys exactly what type of search algorithm we are talking about. The name of each algorithm is always shown in Small Caps; all words typeset this way in this book refer to an algorithm.

Synopsis

A high-level description of the algorithm and what it is designed to do.

Context

A description of a problem that illustrates the "sweet spot" for the algorithm.

Forces

A description of the properties of the problem/solution that must be addressed and maintained for a successful implementation. They are the things that would cause you to choose this algorithm specifically.

Solution

The algorithm description using real working code with documentation. Where appropriate, UML class diagrams are also included.

Consequences

Identifies and discusses the advantages/disadvantages and anti-patterns for this algorithm.

Analysis

A synopsis of the analysis of the algorithm, including performance data as well as other data that helps the reader understand the behavior of the algorithm. Although the analysis section is not meant to "prove" the described performance of an algorithm, readers should be able to understand why the algorithm behaves as it does. We will provide references to actual texts that present the appropriate lemmas and proofs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required