Keep a growing union of number ranges and answer, at any time, whether a single number lies inside it.
Keep a growing union of number ranges and answer, at any time, whether a single number lies inside it.
The discussion opens with the full question.