Company: Amazon_25july
Difficulty: medium
Merge Overlapping Times Problem Description A supply chain manager at an Amazon warehouse is reviewing the logs of when trucks arrived at and departed from the warehouse. Each log entry is a time interval [start, end] with start <= end . The entries are in no particular order, and some of them overlap. Given the collection of time intervals, merge every group of overlapping intervals into a single interval and return the merged intervals sorted in ascending order of their start times. Two intervals overlap when they share at least one point in time. In particular, intervals that meet at an endpoint overlap: [1, 2] and [2, 3] merge into [1, 3] . 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 findOverlappingTimes . 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 inpu