Amazon interview question

I dont really remember, but it was from leetcode