Compare insertion inspection totals

A job registry inserts IDs 110,121,112,132,111110,121,112,132,111, in that order, into two initially empty tables. Each table has 1111 slots indexed from 00 to 1010 and uses h(k)=k mod 11h(k)=k\bmod11.


The first table uses pi=(h(k)+i) mod 11p_i=(h(k)+i)\bmod11; the second uses pi=(h(k)+i2) mod 11p_i=(h(k)+i^2)\bmod11. In both, ii starts at zero for each new key, and insertion stops at the first empty slot.


A probe is one slot inspection, including the final inspection of an empty slot. Find the total number of inspections for all five insertions under each method. Enter both totals as exact integers.

Your answers

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 Linear and Quadratic Probing Questions: