Hashing medium time O(1) average space O(m)
Hash Table — Linear Probing
A hash function turns a key into a slot index. When two keys want the same slot (a collision), open addressing simply probes forward to the next free slot. Lookups repeat the same walk.
Insert each key into 7 slots using h(k) = k mod 7, probing forward on collision.
1 / 13
Practice
Machine twin: /dsa-viz-v2/hash-linear-probing.json — the full deterministic run as structured data.