The probe that ran off the end.
transcript
A hash table that crashes. The hash is right. The walk is not. It fails only at the end of the array. Small tests never show it.
Five slots, numbered zero to four. Keys four, nine and fourteen all hash to slot four. Four takes slot four. Only the first key fits at slot four.
Nine hashes to slot four. It is taken. The buggy walk moves to slot five. There is no slot five. The program fails. Small tests never reach the end.
Without the wrap, the table crashes. With the wrap, nine lands in slot zero. The right answer is nine, fourteen, empty, empty, four.
Move with a remainder. The next slot is slot plus one, mod size. After the last slot comes slot zero. Search must wrap in the same way. Always test the last slot.
Test a key that hashes to the last slot. Full breakdown in the lecture.