Leetcode, Interval, Interview Questions, Google, Meta.
by 1. For an event, if counter becomes 1 after it, then this is one of the start point of the merged interval and if counter becomes 0 after it then it is the end point of the corresponding start point. Restart again with a new start point whenever counter becomes 1 again. Another solution just