Citadel Securities interview question

leetcode coding problem. 2D dynamic programming.