Amazon interview question

about data structures