Morgan Stanley Interview Question

How does a hashmap works