I would like to have int tree set implementation, which is optimized for sets with a lot of continuous regions.
For example, such tree could know that is contains entire region from 100 to 150 and hence searching for 120 ends once this region found.
Similarly, if set contains regions 500...506 and 508...600, then, once 507 is added, two regions are merged.
Similarly regions can be splitted if number removed
I use SparseBitSet for a similar task.
Note that Guava RangeSet uses Integer not int
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With