Closed sprgchma closed 4 years ago
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?
Thank you. I somewhat thought those two conditions are equivalent. I was wrong.
You gave a link to deletion pseudocode in the blog post 'Deletion from hash tables without tombstones', in particular
But your implementation does not have a wraparound branch in the if condition
Do i miss something?