Data Structures & AlgorithmsHardProduct placement · Amazon/Microsoft

Keys 80, 25, 99, 55, 30, 13, 57, 42 are inserted in this order into an empty table of size 13 with h(k) = k mod 13 and linear probing. Counting the first slot examined as one probe, how many probes in total do the 8 insertions make?

  1. A. 11
  2. B. 3
  3. C. 12
  4. D. 8

Correct answer: A. 11

Probes per key: 1, 1, 1, 1, 1, 1, 1, 4, total 11. Counting only collisions (probes beyond the first) would give 3.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic