A hash table has 40 slots and currently stores 30 keys. What is its load factor?
Correct answer D. 0.75
Explanation
The load factor α is the number of stored keys divided by the number of slots: 30 / 40 = 0.75. It indicates how full the table is and drives performance; as α rises, collisions and probe lengths grow. Open-addressing tables are usually resized before α approaches 1, while chaining tables can exceed 1 because each slot holds a list.
Answer checked How we write and check questions
Discussion