Implemented problem 11. Used dynamic programming to significantly decrease the running time. However, certain parts of the code can be made cleaner.