Jane Street Interview Question

problem solving for 5 rounds