Pregunta de entrevista de Turing

Solve a programming problem in 1 hour. Dynamic programming.