Amazon interview question

More onto Data Structures and Algorithms