Algorithms

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 ___.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.