Load Factor

A gym with 100 lockers and 50 members is fine. 100 lockers, 90 members. Now everyone’s waiting for the same row. The load factor tells you when to build a bigger gym.

load_factor = entries / buckets

0.25 → lots of empty buckets, great lookup speed
0.75 → the usual resize trigger
1.50 → chains 1–2 long on average; lookups crawl

When it crosses the threshold, the table grows and everything is rehashed into the bigger array.