Practice Overview

These problems take the ideas and techniques you learned in the chapter and apply them to new contexts. It is best to attempt these after reading the chapter and feeling confident with the material. For each problem, write your own solution before reading the provided one. Give yourself more time to work through the challenge.

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

  1. Problem: Remove Duplicates from Sorted Array
  2. Solution: Brute Force
  3. Solution: Two Pointers
  4. Problem: Two Sum When Input Array is Sorted
  5. Solution: Brute Force
  6. Solution: Binary Search
  7. Solution: Two Pointers