Pocket Gems Interview Question

I was asked about how to use dynamic programming