Pregunta de entrevista de Google

A question that involved dynamic programming.