Cisco Interview Question

They asked a dynamic programming question