Pregunta de entrevista de Squarepoint Capital

a dynamic programming leetcode problem