NVIDIA Interview Question

a dynamic programming coding question