Amazon interview question

How do hashmaps work?