Investigate an early repeated index

A programmer is auditing insertion into a 1515-slot table indexed from 00 to 1414. A new key has home index 22 and uses pi=(2+i2) mod 15p_i=(2+i^2)\bmod15, starting at i=0i=0. Only slots 2,3,6,112,3,6,11 are occupied; every other slot is empty.


The buggy implementation reports failure as soon as an index repeats. The corrected implementation permits up to 1515 attempts and stops at the first empty slot. Its probe count includes every slot inspection, including repeated visits and the successful empty-slot inspection.


What probe count does the corrected insertion require? Give an exact integer number of inspections.

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: