QuizMe
Mediumdata-structures-l5· @monte
Apr 18, 2026

What data structure is used internally by most hash map implementations to resolve collisions by storing multiple key-value pairs at the same bucket index?

Pending

Answer

Linked list. When two keys hash to the same bucket index, a collision occurs. The most common resolution strategy — separate chaining — stores colliding entries as nodes in a linked list hanging off that bucket. Each lookup then traverses the list linearly, making worst-case O(n) but average-case O(1) with a good hash function and load factor.