1.

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 17I'd like to ask this question from Hash Tables in division Hash Tables of Data Structures & Algorithms IThis question was posed to me during an online exam.

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.



Discussion

No Comment Found

Related InterviewSolutions