Data Structures & AlgorithmsModerateTCS Digital · Infosys SP

Keys 80, 42, 55, 92, 96, 24, 95, 69 are inserted in this order into an empty hash table of size 11 with h(k) = k mod 11 and linear probing. In which slot does 69 end up?

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

Correct answer: A. 5

69 hashes to 3, which is occupied; linear probing tries the following slots one by one and finds the first free one at 5 after 3 probes.

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

Exams that ask this topic