GATE Computer ScienceVery hardGATE CSE

A hash table of size 11 uses double hashing with h1(k) = k mod 11 and h2(k) = 7 − (k mod 7), probing slot (h1 + i·h2) mod 11 for i = 0, 1, 2, … Keys 10, 21, 32, 43, 54, 65 are inserted in that order. How many slot probes are made in total (counting the final successful probe of each insertion)?

  1. A. 9
  2. B. 13
  3. C. 11
  4. D. 6

Correct answer: C. 11

Probe counts per key are 1, 2, 2, 2, 2, 2, totalling 11.

More Algorithms questions

Exams that ask this topic