The idea
Key formulas
Bucket index
Load factor
Loading lessons…
Just a moment, getting everything ready. The first load can take up to a minute.
Data structures and algorithms
See how hashing maps keys to buckets, chaining handles collisions, and load factor describes occupancy.
A hash function maps a key to a bucket index. Different keys can map to the same bucket: this is a collision. With separate chaining, each bucket stores a list of keys, so a collision adds another key to that chain.