Data Structures & AlgorithmsHardGATE CS · TCS NQT · Product Company SDE

Keys 76, 92, 75, 39, 73, 79, 41, 56, 14 are inserted into a hash table of size 11 with h(k) = k mod 11 and linear probing. At which index is 41 stored?

  1. A. 4
  2. B. 8
  3. C. 10
  4. D. 6

Correct answer: B. 8

Insert in order, moving to the next slot on collision. Final table: [–, 56, 79, 14, 92, –, 39, 73, 41, 75, 76]; 41 is at index 8.

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

Exams that ask this topic