Company: jubliant_19sep
Difficulty: medium
Merge Intervals Problem Description A scheduling system stores a collection of time intervals, each written as a pair [start, end] with start <= end . The intervals arrive in no particular order, and some of them overlap. Merge every group of overlapping intervals into a single interval, and return the merged intervals sorted by their start times. Two intervals overlap when they share at least one point in time. In particular, intervals that meet at an endpoint overlap: [6, 9] and [9, 11] merge into [6, 11] . Merging is transitive: if A overlaps B and B overlaps C , all three become one interval, even when A and C do not overlap each other. Complete the function getMergedIntervals . It receives the list of intervals and returns the merged intervals, each as a pair [start, end] , in increasing order of start . Input Format Read from standard input. n 2 start[1] end[1] start[2] end[2] ... start[n] end[n] Line 1 contains the integer n , the number of intervals. Line 2 contains the inte