LeetCode
Data Stream as Disjoint Intervals
Click
here
for an explanation.