GATE Computer ScienceVery hardGATE CSE · UGC NET

A hash table of size 13 uses double hashing: the i-th probe for key k is (k mod 13 + i·(1 + k mod 11)) mod 13. The keys 18, 41, 22, 44, 59, 32, 31, 73, 5, 70 are inserted in this order. In which slot does key 70 end up?

  1. A. 10
  2. B. 11
  3. C. 1
  4. D. 6

Correct answer: A. 10

Tracing the probe sequences, earlier keys occupy slots ["2:41","4:32","5:18","6:44","7:59","8:73","9:22","10:70","11:5","12:31"] and key 70 lands in slot 10.

More Programming and Data Structures (GATE) questions

Exams that ask this topic