Load factor
The number of elements in a hash table divided by the number of buckets. The higher it is, the more collisions; past a limit, the table grows.
Example
60 elements in 100 buckets give a load factor of 0.6. In Java, past 0.75 the table doubles.
Test yourself: Load factor
Hash tables
A hash table with 60 elements and 100 buckets has a load factor of ___.
60 / 100 = 0.6. In Java, the table grows when passing 0.75: with 100 buckets, at element 76.
0/1
â–¶ Play