Leetcode, Interval, Interview Questions, Google, Meta.
the list id from the set. Thus all intersection intervals are the ones where the set contains both the list ids. Time complexity is O(N). We can also solve this problem without using the events but using only the intervals. It is similar to merge step in merge sort. For 2 intervals I and J