Amazon interview question

Leetcode medium about dynamic programming