Jane Street interview question

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