Amazon Interview Question

Leetcode qs, med and hard.