Finished the dynamic programming question (coding only yet)