Collision
Domain: Data Structures
🎯 Motivation
Two different keys hash to the same index. Collisions are inevitable and must be handled for the hash table to work correctly.
📋 Concrete Example
Keys Ada and Bob both hash to index 5. The table must store both. Common fixes: chaining (linked list at index 5) or open addressing (find the next empty slot).
🔗 Analogy
Two students whose surnames start with C are assigned the same locker. The school handles this by putting a divider in the locker (chaining) or finding the next empty locker nearby (probing).