← all tinkertoys

How a hash table grows

Keys land in buckets by hash. When the table gets crowded it doubles and re-hashes everything, which is what keeps lookups fast.

Tweak it

Break it

Normal run: the table doubles whenever items ÷ buckets passes the threshold.

What to notice