Problem 2: Adding a memoized, recursive implementation.
Problem 2: Added notes about recursive implementation.