Hash Function
Turns a key into a slot number. Here it is key mod capacity, weak on purpose so collisions show.
Hash Table: Fill a table and watch it collide
Slot 1 holds 12, not 23. Walk on to slot 2.
Cost
- Hash
- O(key length)
- Space
- O(1)
Before this
Leads to
Topics that need this one first.
Taught by the same lesson
Hash Table covers these too, in the same run.