AlgoScope

Hash Table Lookup

AlgorithmintermediateHash Tables and Collision Handling

Hash the key and walk the same path the insert would have walked.

Decision · step 3 of 6Hash Table: Find a key behind a collision
01234551662778910probe5 > 27

Slot 5 holds 5, not 27. Walk on to slot 6.

Open in the player →or start at step 3

What you will see

The same hash lands on the same bucket; the chain or probe path is walked.

How hash table works →

Cost

BestO(1)
AverageO(1)
WorstO(n)
SpaceO(1)

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.

Leads to

Topics that need this one first.