+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is the hash function used in the division method?

(a) h(k) = k/m

(b) h(k) = k mod m

(c) h(k) = m/k

(d) h(k) = m  mod k

My question comes from Hash Tables topic in portion Hash Tables of Data Structures & Algorithms I

I have been asked this question in quiz.

1 Answer

+1 vote
by (737k points)
selected by
 
Best answer
Correct choice is (b) h(k) = k mod m

For explanation: In division method for creating hash functions,  k keys are mapped into one of m slots by taking the reminder of k divided by m.

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.

Categories

...