Looking for a Good Interval Tree Implementation

0
5
Asked By Coder_Sparkle92 On

Hey everyone! I'm working on a project where I need to quickly identify which non-overlapping intervals certain numbers fall into. To do this efficiently, I want to first build an interval tree. I'm hoping to avoid programming this data structure from scratch, so if anyone knows of a good implementation, I'd really appreciate the recommendations. Thanks in advance!

1 Answer

Answered By TechGuru_77 On

Have you checked out Guava's `RangeSet`? It might fit your needs pretty well for handling these intervals.

IntervalHunter_88 -

I think `RangeMap` would be more suitable for me since I need to associate some information with my ranges. But this is definitely helpful, thanks!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.