Amazon interview question

Don't remember specifically but Leetcode Medium difficulty level