Examveda

What are the values of h1(k) and h2(k) in the hash function?

A.

h1(k) = m mod k
    h2(k) =  1+ (m’ mod k)

B.

h1(k) = 1 + (m mod k)
    h2(k) =  m’ mod k

C.

h1(k) = 1+ (k mod m)
    h2(k) =  k mod m

D.

h1(k) = k mod m
    h2(k) =  1+ (k mod m’)

Answer: Option D


This Question Belongs to Data Structure >> Hashing

Join The Discussion

Related Questions on Hashing

In hashing, what is a "collision"?

A. When two elements are stored in the same slot.

B. When a hash table exceeds its capacity.

C. When a hash function fails to produce a unique index.

D. When two keys hash to the same index.