1.

What can be the value of m in the division method?(a) Any prime number(b) Any even number(c) 2^p – 1(d) 2^pI want to ask this question from Hash Tables in section Hash Tables of Data Structures & Algorithms II have been asked this question in unit test.

Answer»

Correct option is (a) Any prime number

Easy explanation - A prime number not too CLOSE to an exact power of 2 is OFTEN a good choice for m since it REDUCES the number of collisions which are likely to OCCUR.



Discussion

No Comment Found

Related InterviewSolutions