Amazon interview question

Mainly about algorithms and data structures.