Basic recursive solution to problem 3
Cleaned up recursive memoized solution to problem 3