Pregunta de entrevista de JPMorganChase

some medium dynamic programming problems.