Amazon Interview Question

see the leetcode list of amazon OA