Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2014 | Question 64
  • Last Updated : 11 May, 2018

Consider a 13 element hash table for which f(key)=key mod 13 is used with integer keys. Assuming linear probing is used for collision resolution, at which location would the key 103 be inserted, if the keys 661, 182, 24 and 103 are inserted in that order?
(A) 0
(B) 1
(C) 11
(D) 12


Answer: (B)

Explanation: 661 mod 13 = 11
182 mod 13 = 0
24 mod 13 = 11, already filled, so after linear probing it will get index 12
103 mod 13 = 12, already filled, so after linear probing it will get index 1

So, option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :