Six Probes To Refuse

A hash table has 8 slots and resolves collisions by linear probing, with h(k) = k mod 8 and probe sequence h(k), h(k)+1, h(k)+2, ... wrapping around. These keys are inserted in this order:

12, 20, 4, 28, 15, 3

A lookup probes forward until it finds the key or reaches an empty slot. How many slots does an unsuccessful lookup of 44 examine before it can report the key is absent?

A

8, since the table has to be scanned completely before absence is certain

B

6

C

1, because slot 4 holds 12 and 12 is not 44

D

5