Skip to content
DSA Visualizerpreview

Hash table: linear probing

Keys that collide take the next free slot, so clusters form and grow.

O(1) average while the table is under about 70% full time · O(m) space

Keys15, 11, 27, 8, 12, 22, 4size 10

10 empty slots. Each key starts at slot key mod 10.

Slots: 0: empty, 1: empty, 2: empty, 3: empty, 4: empty, 5: empty, 6: empty, 7: empty, 8: empty, 9: empty.
  • compare
  • swap or write
  • settled

1 / 17

Speed

Space play · ← → step · Home End jump · drag the strip to scrub