Sollicitatievraag bij Citadel Securities

asked to solve a problem about dynamic programming