Pergunta de entrevista da empresa JPMorganChase

some medium dynamic programming problems.