1.

What is the hash function used in multiplication method?(a) h(k) = floor( m(kA mod 1))(b) h(k) = ceil( m(kA mod 1))(c) h(k) = floor(kA mod m)(d) h(k) = ceil( kA mod m)Origin of the question is Hash Tables topic in portion Hash Tables of Data Structures & Algorithms II got this question in an internship interview.

Answer» RIGHT choice is (a) h(k) = floor( m(kA MOD 1))

Explanation: The HASH function can be COMPUTED by multiplying m with the fractional part of kA (kA mod 1) and then computing the floor value of the result.


Discussion

No Comment Found

Related InterviewSolutions