Is wraparound check absent for deletion in khashl?
sprgchma opened this issue · comments
Garcha Sprgchma commented
You gave a link to deletion pseudocode in the blog post 'Deletion from hash tables without tombstones', in particular
if (j > i and (k <= i or k > j)) or
(j < i and (k <= i and k > j)) (note 2)
slot[i] := slot[j]
i := j
But your implementation does not have a wraparound branch in the if condition
if (k <= i || k > j)
keys[i] = keys[j], i = j;
Do i miss something?
Attractive Chaos commented
Thank you. I somewhat thought those two conditions are equivalent. I was wrong.