Hash Table Insert
Hash the key to a slot, then walk forward past anything already there.
Hash Table: Insert that walks past a collision
Insert 45. Its hash is 45 mod 11, which is slot 1.
Cost
- Best
- O(1)
- Average
- O(1)
- Worst
- O(n)
- Space
- O(1)
Before this
Related
Leads to
Topics that need this one first.
Taught by the same lesson
Hash Table covers these too, in the same run.