I've given this a fair amount of thought, and so far I haven't been able to come up with any clean, fast, solutions (though I have come up with fast solutions).
I'm indexing a group of items, each of which has a number of intervals associated with it. I definitely need to store the intervals associated with each item, and I need to index over this. I also however, need to find items which do not have any overlaps with a specified interval.
So far, the only reasonable solution I've been able to think of is also calculating and storing open intervals and indexing over that as well. This is a fast solution, but it is essentially storing the exact same data twice.
Also, the indexing library I have to work with does not support anything equivalent to set difference operations.
This is for a side project, not homework or anything. My homework is currently at the intro to pointers level.
All Shadow priest spells that deal Fire damage now appear green.
Big freaky cereal boxes of death.