Please wait
Loading technology simulations
The requested content is still loading.
Finished experimenting?
Save one completion to this browser's signed guest ledger, or directly to your account when signed in.
Please wait
Loading technology simulations
The requested content is still loading.
Save one completion to this browser's signed guest ledger, or directly to your account when signed in.
| α | probing | chaining |
|---|---|---|
| 0.5 | 1.50 | 1.25 |
| 0.75 | 2.50 | 1.38 |
| 0.9 | 5.50 | 1.45 |
1insert(key):2 i = key % M3 while slot[i] occupied:4 i = (i + 1) % M5 slot[i] = key
This hash table simulator shows the two classic ways to handle collisions side by side. Insert a key and watch h(key) = key % M pick its home bucket; when that bucket is taken, separate chaining appends to a per-bucket list while linear probing walks forward to the next free slot, highlighting each probe. A load-factor card makes the crucial trade-off concrete: as α = n / M rises, linear probing's expected probes climb like ½(1 + 1/(1−α)) — about 5.5 at α = 0.9 — while chaining stays near 1 + α/2, which is why real hash maps resize before they fill. The signature interaction: Predict mode asks you to click the exact slot a key will land in (computing the modulo, then walking over occupied slots), turning the hash-and-probe rule into active recall.
hash table · hash function modulo · separate chaining · linear probing · open addressing · load factor · collision resolution
Browse all Technology simulations →
Free to use in your browser — no signup required. Found a bug or have an idea to make it better? Tell us.