Amazon interview question

Basic algorithm questions that you can find on leetcode