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

(a) Hash key = key mod table size

(b) Hash key=(hash(x)+F(i)) mod table size

(c) Hash key=(hash(x)+F(i^2)) mod table size

(d) H(x) = x mod 17

The above asked question is from Hash Tables topic in portion Hash Tables of Data Structures & Algorithms I

I had been asked this question during an online exam.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Right answer is (c) Hash key=(hash(x)+F(i^2)) mod table size

Explanation: Hash key=(hash(x)+F(i^2)) mod table size is the formula for quadratic probing. Hash key = (hash(x)+F(i)) mod table size is the formula for linear probing.

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

...