Pregunta de entrevista de Google

Dynamic Programming Question from Leetcode