Amazon interview question

I was given a Leetcode easy and medium.