Amazon Interview Question

Data structures