NVIDIA Interview Question

How to solve a dynamic programming problem