Amazon interview question

Leetcode-medium/hard level question about dynamic programming.