Amazon interview question

Data structures and concepts along with optimization