Dsa
Intervals
Easy
Meetings Overlap
You are given a list of meeting time intervals. Each interval is defined by a start and an end time. Your task is to determine if any of the provided meetings overlap. If there is at least one overlap, print 'Overlap' to STDOUT; otherwise, print 'No Overlap'.
Input Format:
- The first line contains an integer n (1 <= n <= 100) - the number of intervals.
- The next n lines each contain two integers: the start and end time of the interval (0 <= start < end <= 10^9).
Output Format:
- Print 'Overlap' if any interval overlaps, otherwise 'No Overlap'.
Example:
Input:
3
1 3
2 4
5 6
Output:
Overlap
Key concepts
intervalssortingmerging
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