A New Interval Arrives

You have a clean, sorted, non-overlapping list: [[1,2],[3,5],[6,7],[8,10],[12,16]].

Now insert [4,8]. Some bars might need to merge, some won't. Where does it land — and which bars does it swallow?

Insert and Merge

Drag the partition lines to split the number line into three zones. Everything between the lines will merge with the new interval.

Drag the two partition lines to split intervals into three zones: LEFT (entirely before), OVERLAP (touches the new interval), RIGHT (entirely after).
LEFTOVERLAPRIGHT0246810121416[1,2][3,5][6,7][8,10][12,16][4,8] newLR
LEFT: 0OVERLAP: 5RIGHT: 0