Question d’entretien chez Squarepoint Capital

code task about dynamic programming, simple probabiltiy question