Amazon Interview Question

Basic algorithm questions that you can find on leetcode