Algorithms and Data Structures · Junior · Question 13 of 75

What is a collision in a hash table?

Explanation

There are more possible keys than buckets, so different keys sometimes hash to the same index. Tables handle this with chaining (a list per bucket) or open addressing (probing the next free slot).

Further reading

Problem with a question

Algorithms and Data Structures · Junior · question 13

Test yourself

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

Take this quiz