Amazon Interview Question

Data structures and algorithms and oops