Squarepoint Capital Interview Question

Dynamic programming problem with space optimization