Leetcode, Interval, Interview Questions, Google, Meta.
intersection: [[2, 6], [9, 10]] Solution: One solution is to use events. Sort the start and end events first. Keep a counter to track the number of ongoing tasks. Increment the counter by 1 if we see a start event and decrement by 1 if we see an end event. For the union, we start our tracking