Interval List Intersections (LC #986) finds intersections of two sorted interval lists. Use two pointers, one for each list. For the current pair, compute intersection as [max of starts, min of ends]. If this is valid (start less than or equal to end), add it to the result. Advance the pointer for whichever interval ends first. This runs in time and extra space. This is the building block for the Meta variant of Merge Intervals with two lists.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/sorting-searching/interval-list-intersections
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████████████████████████████████████████████████████████████████████████████████████████████