What is a hash collision?

What is a hash collision?

Approach: Explain two keys mapping to same index.

Occurs when two different keys produce the same hash value from a hash function, mapping them to the same slot in a hash table.

Follow-up: Name two methods to resolve collisions.

Key concepts: hash function, chaining, open addressing.