Squarepoint Capital interview question

Dynamic programming problem with space optimization