Google interview question

Coding challenge had a dynamic programming problem.