What is the advantage of hashing with chaining?

Category: QuestionsWhat is the advantage of hashing with chaining?
Editor">Editor Staff asked 1 month ago

What is the advantage of hashing with chaining?
 
(a) cache performance is good
 
(b) uses less space
 
(c) less sensitive to hash function
 
(d) has a time complexity of O(n) in the worst case
 
This key question is from Hash Tables in division Hash Tables of Data Structures & Algorithms I
 
The question was asked during an online interview.

1 Answers
Editor">Editor Staff answered 1 month ago

The correct choice is (c) less sensitive to hash function
 
Explanation: Hashing with separate chaining has an advantage that it is less sensitive to a hash function. It is also easy to implement.