Load Factor
Entries divided by buckets; drives expected probe length and when to rehash.
Decision · step 2 of 11Rehashing: Collisions before the rehash
insert 5. 5 mod 5 = 0 and slot 0 is free. Load 1 / 5 = 0.20, under 0.70.
What you will see
A gauge fills as keys are inserted; probe lengths grow visibly as it approaches 1.
Cost
| Space | O(1) |
|---|
Expected chaining lookup is O(1 + load factor).
How you work with it here
play it through, step one change at a time, scrub to any step, run it on your own input, try operations in any order.
Screen readers: Buckets announce index, occupancy and keys; each step announces the hash value and where the key lands.
Reduced motion: Keys appear in their bucket with a crossfade instead of travelling from the hash label.