AlgoScope

Load Factor

AnalysisintermediateHash Tables and Collision Handling

Entries divided by buckets; drives expected probe length and when to rehash.

Decision · step 2 of 11Rehashing: Collisions before the rehash
501234probe

insert 5. 5 mod 5 = 0 and slot 0 is free. Load 1 / 5 = 0.20, under 0.70.

Open in the player →or start at step 2

What you will see

A gauge fills as keys are inserted; probe lengths grow visibly as it approaches 1.

How rehashing works →

Cost

SpaceO(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.

Before this

Related

Taught by the same lesson

Rehashing covers these too, in the same run.