Hashing medium time O(1) average space O(n + m)
Hash Table — Chaining
Instead of probing, each bucket holds a linked list. Colliding keys are appended to that bucket’s chain. Lookups hash to a bucket, then walk its short chain.
Insert keys into 5 buckets with h(k) = k mod 5. Collisions extend a chain.
1 / 9
Practice
Machine twin: /dsa-viz-v2/hash-chaining.json — the full deterministic run as structured data.