Amazon interview question

data structures and algo , oops