GATE Computer ScienceHardGATE CSE

Keys 22, 33, 44, 12, 23, 34, 45, 1 are inserted in this order into a table of size 11 using h(k) = k mod 11 with linear probing. Counting every slot examined (occupied ones and the final empty one), how many probes are made in total?

  1. A. 31
  2. B. 27
  3. C. 34
  4. D. 8

Correct answer: A. 31

Insert probes in order: 1, 2, 3, 3, 4, 5, 6, 7 = 31.

More Algorithms questions

Exams that ask this topic