Amazon Interview Question

2 leetcode style algorithmic questions