Squarepoint Capital Interview Question

Dynamic programming question, simple probability theory problem