Amazon Interview Question

2 Leet code easy/medium questions