1.

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 17The above asked question is from Hash Tables topic in portion Hash Tables of Data Structures & Algorithms II had been asked this question during an online exam.

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.



Discussion

No Comment Found

Related InterviewSolutions