Pergunta de entrevista da empresa Jane Street

Dynamic Programming, Algorithms questions. Can code in any language.