Hash Tables with Quadratic Probing Multiple choice Questions and Answers (MCQs)
Click on any option to know the CORRECT ANSWERS
How many constraints are to be met to successfully implement quadratic probing?
Question 6 Explanation:
2 requirements are to be met with respect to table size. The table size should be a prime number and the table size should not be more than half full.
Which among the following is the best technique to handle collision?
Question 7 Explanation:
Quadratic probing handles primary collision occurring in the linear probing method. Although secondary collision occurs in quadratic probing, it can be removed by extra multiplications and divisions.
Which of the following techniques offer better cache performance?
Question 8 Explanation:
Linear probing offers better cache performance than quadratic probing and also it preserves locality of reference.
What is the formula used in quadratic probing?
Hash key = key mod table size
Hash key=(hash(x)+F(i)) mod table size
Hash key=(hash(x)+F(i2)) mod table size
H(x) = x mod 17
Question 9 Explanation:
Hash key=(hash(x)+F(i2)) mod table size is the formula for quadratic probing. Hash key = (hash(x)+F(i)) mod table size is the formula for linear probing.
For the given hash table, in what location will the element 58 be hashed using quadratic probing?
Question 10 Explanation:
Initially, 58 collides at position 8. Another collision occurs one cell away. Hence, F(i2)=4. Using quadratic probing formula, the location is obtained as 2.
There are 10 questions to complete.