Problem 31: Brute force, recursive solution
Problem 31: Dynamic programming solution