Leetcode, Interval, Interview Questions, Google, Meta.
uses the intervals and not the events. For 2 intervals I and J belonging to the 2 lists, either I’s end is longer than J’s end or J’s end is longer than I’s or both I and J have the same end point. If I’s end is longer than J’s, we move to the J+1 interval of 2nd list after finding the union of I