Practice mode Data Structures

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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.