Algorithms and Data Structures · Middle · Question 54 of 75

What makes a good hash function for a hash table?

Explanation

Even distribution keeps chains short. Uniqueness is impossible when there are more keys than buckets, and keeping similar keys together would cause clusters of collisions.

Further reading

Problem with a question

Algorithms and Data Structures · Middle · question 54

Test yourself

Take the Algorithms and Data Structures · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz