Amazon Interview Question

data structures and algo , oops