CS323 - Dynamic Programming Homework