Based on Open Addressing As new keys are inserted, old keys are shifted around in a way such that all keys stay reasonably close to the slot they originally hash to.
Probe Sequence Length (psl)
How many steps do we need to take to find the entry from the initial hashed location.
Maintaining psl
Invariant: For any i, the values that hash to bucket i precede the values that hash to bucket i+1 (this naturally includes wraparound)
if (vpsl > b[p].psl) { swap v and b[p].v; swap vpsl and b[p].psl; }