GATE Computer ScienceHardNIELIT Scientist B

Keys 41, 22, 8, 30, 19, 52, 33, 63 are inserted in this order into an empty table of size 11 with h(k) = k mod 11 and linear probing. How many slot examinations (the final empty slot included) are made in total over all insertions?

  1. A. 28
  2. B. 32
  3. C. 33
  4. D. 30

Correct answer: D. 30

Counting the home slot and every further probe for the 8 insertions gives 30 examinations.

More Algorithms questions

Exams that ask this topic