Pergunta de entrevista da empresa Amazon

leetcode hard question using dynamic programming