Pregunta de entrevista de Adobe

One problem was a classical DP problem.