Skip to content
DSA Visualizerpreview

Hash table: rehashing to grow

Linear probing that doubles the table before it gets crowded, moving every key to its new home.

O(1) amortised insert time · O(n) space

Keys12, 7, 33, 20, 5, 18, 41

A table of 4 slots. Keep it under 75% full by doubling when an insert would pass that.

Table of 4 slots: empty, empty, empty, empty.
  • compare
  • swap or write
  • settled

1 / 20

Speed

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