Pocket Gems interview question

Dynamic Programming and Graphs