Domanda di colloquio di Turing

Solve a programming problem in 1 hour. Dynamic programming.