Amazon interview question

Question related to data structures and algorithms