Amazon interview question

Data structures: hash, tree. Complexity.