Dsa
Intervals
Easy
Overlapping Meeting Schedules
Given a list of meeting schedules represented as intervals (start time, end time), determine a merged list of intervals such that any overlapping intervals are combined into one. The input will be provided as a series of lines with each line representing a meeting defined by two integers: the start and end times of the meeting, inclusive. The output should print each merged interval in the format 'start end', one per line. If there are no overlapping intervals, print them as they are.
Example:
Input:
1 3
2 4
5 7
6 8
Output:
1 4
5 8
Key concepts
intervalsschedulingmerging
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now