Frage im Vorstellungsgespräch bei Squarepoint Capital

code task about dynamic programming, simple probabiltiy question