Amazon interview question

Only Data structures and algorithms