ProgrammingModerate

Keys 13 and 23 are inserted with linear probing into a table of size 10 with h(k) = k % 10. In which slot does 23 land?

  1. A. 3
  2. B. 4
  3. C. 2
  4. D. 5

Correct answer: B. 4

Both keys hash to slot 3, 13 occupies it, and 23 probes to slot 4.

More C Programming questions

Exams that ask this topic