Practice Overview

These problems apply what you learned in the chapter to new situations. Attempt them after you have read the chapter and feel confident with the material. For each problem, write your own solution before reading the provided one. Give yourself more time than you think these will take.

You can download the accompanying code for these practice problems: starter and solution.

  1. Problem: Fibonacci with Memoization
  2. Solution: Caching the Results
  3. Problem: A DynamicArray That Shrinks
  4. Solution: Shrinking at Half Empty
  5. Solution: Shrinking at a Quarter Full