+1 vote
in Data Structures & Algorithms I by (88.2k points)
Which of the following trait of a hash function is most desirable?

(a) it should cause less collisions

(b) it should cause more collisions

(c) it should occupy less space

(d) it should be easy to implement

Query is from Hash Tables topic in portion Hash Tables of Data Structures & Algorithms I

I got this question in an internship interview.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Correct option is (a) it should cause less collisions

The best I can explain: Hash function calculates and returns the index for corresponding data. So the most important trait of a hash function is that it should cause a minimum number of collisions.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.