Pregunta de entrevista de Amazon

dynamic programming problem - can't remember what it was