Squarepoint Capital Interview Question

leetcode problem was about dynamic programming