Amazon interview question

Implement hashmap and explain complexity