Pset 6 Dynamic Programming