Hacker News new | ask | show | jobs
by nayuki 982 days ago
For deletion, I think you can augment the current data structure so that instead of just storing each value, you pair it up with a Boolean telling whether the value is actually still included or not.

But you lose out on insertion and search efficiency; the worst case is dependent on the maximum number of values ever inserted, not the number of currently valid values.

1 comments

The reason I mentioned using a hierarchical bitmap was precisely the inefficiency of just having one bool per element.