Amazon interview question

Leetcode medium and hard problems