ProgrammingVery hard

Which operation is needed to make open addressing deletions safe for later lookups?

  1. A. Set the deleted slot to zero, which marks it empty
  2. B. Move every later key one slot back without checking
  3. C. Mark the deleted slot with a tombstone so probing continues past it
  4. D. Skip the deletion and mark the key as absent elsewhere

Correct answer: C. Mark the deleted slot with a tombstone so probing continues past it

A tombstone keeps the probe sequence unbroken while still allowing insertion into the slot. Emptying it stops later searches early.

More C Programming questions

Exams that ask this topic