Update with pseudocode, solution, and driver tests.