Cisco interview question

They asked a dynamic programming question