Hacker News new | ask | show | jobs
by throw5away 1840 days ago
This is essentially equivalent to feeding the input through bitwise-NOT first. Unfortunately, there are far more integers that are neither sparse nor dense than integers that are sparse or dense.
1 comments

But I can certainly imagine there could be problem domains where most of some collection of integers being manipulated are expected to be sparse or dense.