Pergunta de entrevista da empresa Squarepoint Capital

Dynamic programming question, simple probability theory problem