AlgoScope

Hash Function

Turns a key into a slot number. Here it is key mod capacity, weak on purpose so collisions show.

Data structures, mathematics, intermediate
Probing slot 1, which holds 12. It does not match, so the probe moves on.01212345678910probe12 < 23

Hash Table: Fill a table and watch it collide

Decision, step 8 of 32

Slot 1 holds 12, not 23. Walk on to slot 2.

Cost

Hash
O(key length)
Space
O(1)

Leads to

Topics that need this one first.

Taught by the same lesson

Hash Table covers these too, in the same run.