Amazon interview question

leetcode easy to lc med