Pregunta de entrevista de Superna

I was asked dynamic programming leetcode medium