1.

Using division method, in a given hash table of size 157, the key of value 172 be placed at position ____(a) 19(b) 72(c) 15(d) 17I would like to ask this question from Hash Tables topic in section Hash Tables of Data Structures & Algorithms IThis question was addressed to me during an interview for a job.

Answer»

The correct option is (c) 15

Easy explanation - The KEY 172 can be placed at POSITION 15 by using the formula

H(k) = k MOD m

H(k) = 172 mod 157

H(k) = 15.



Discussion

No Comment Found

Related InterviewSolutions