Maps Flashcards
Maps
When does collision occur?
Collision occurs when 2 different keys are hashed to the same value
Describe how a Hash Map works
Describe the role “load factor” plays in Hash Maps
The load factor determines how full a Hash Map can be at any point in time. For example, a load factor of .75 implies that a Hash Map will expand in size and rehash and redistribute key-value pairs into the exapanded Hash Map. This is done to prevent collision since as the load factor approaches 1, the probability of collision increases
Hash Maps
What is separate chaining?
Separate chaning is the process of using a data structure to store the values of different keys that evaluate to the same hash value