Chapter 1. Small problems
Figure 1.1. The height of each stickman is the addition of the previous two stickmen’s heights added together.
Figure 1.2. The recursive function fib(n) calls itself with the arguments n-2 and n-1.
Figure 1.3. Every non-base-case call of fib2() results in two more calls of fib2().
Figure 1.4. The human memoization machine
Figure 1.5. Compressing a String representing a gene into a 2-bit-per-nucleotide bit string.
Figure 1.6. A one-time pad results in two keys that can be separated and then recombined to recreate the original data.
Figure 1.7. The challenge is to move the three discs, one at a time, from tower A to tower C. A larger disc may never be on top of a smaller disc.
Chapter 2. Search problems
Figure 2.1. A nucleotide is represented by one of the letters A, C, G, and T. A codon is composed of three nucleotides, and a gene is composed of multiple codons.
Figure 2.2. In the worst case of a linear search, you’ll sequentially look through every element of the array.
Figure 2.3. In the worst case of a binary search, you’ll look through just lg(n) elements of the array.
Figure 2.4. In depth-first search, the search proceeds along a continuously deeper path until it hits a barrier and must backtrack to the last decision point.
Figure 2.5. In a breadth-first search, the closest elements to the starting location are searched first.
Figure 2.6. Euclidean distance is the length of a straight line from the starting point to the goal.