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

(a) H(x)= key mod table size

(b) H(x)= (key+ F(i^2)) mod table size

(c) H(x)= (key+ F(i)) mod table size

(d) H(x)= X mod 17

I'd like to ask this question from Hash Tables in division Hash Tables of Data Structures & Algorithms I

This question was posed to me during an online exam.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Correct choice is (c) H(x)= (key+ F(i)) mod table size

To explain: The hash function used in linear probing is defined to be H(x)= (key+ F(i)) mod table size where i=0,1,2,3,…,n.

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

...