used dynamic programming to solve the problem

way faster. turns out this problem has an optimal substructure. Meaning
it can be broken up in to smaller parts. aka pathfinding
Problem 16

Python basically solves that one for you...