3 ms·
This is one of those cases where being able to name the problem helps. It's a discrete interval problem and is typically solved by a discrete interval tree. Di
by AlotOfReading 1y ago
This is one of those cases where being able to name the problem helps. It's a discrete interval problem and is typically solved by a discrete interval tree.
Diets are a particularly clever solution to this:
https://web.engr.oregonstate.edu/~erwig/diet/ https://web.engr.oregonstate.edu/~erwig/diet/
- monkeyelite 1y agoThat’s the same idea as putting intervals in map, an ordered tree.