Amazon interview question

based on data structure and algorithms