Following a double-hashing probe sequence

A hash table has 17 slots, numbered 0 to 16, and uses double hashing with h1(k)=k mod 17h_1(k) = k \bmod 17 and h2(k)=1+(k mod 13)h_2(k) = 1 + (k \bmod 13), so probe ii is slot (h1(k)+i⋅h2(k)) mod 17(h_1(k) + i \cdot h_2(k)) \bmod 17. Slots 6, 7 and 15 are occupied, and every other slot is empty. Key 125 is inserted. In which slot does it end up? Give the slot index as a whole number.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Double Hashing and Removal Questions: