Find Overlapping Times

Problem Overview

  • Merge overlapping time intervals [start, end] and return the merged set sorted by start time.
  • Input: int intervals[n][2]; Output: merged int[][2] in ascending start order.
  • Constraints: 1 ≤ n ≤ 1e5, values up to 1e9, with intervals[i][0] ≤ intervals[i][1].
  • Real-world context: Supply Chain Manager reviewing truck arrival/departure logs at an Amazon warehouse.
  • Asked in Amazon interviews; a common coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: