Question bank › Intervals
Dsa Intervals Medium

Event Overlap Checker

You are given a list of events represented by intervals (start, end). Your task is to determine if any events overlap. Output 'YES' if there is any overlap and 'NO' otherwise. Input Format: - An integer n (1 ≤ n ≤ 1000), the number of events. - Followed by n lines, each containing two integers start and end (0 ≤ start < end ≤ 10^9). Output Format: - 'YES' if there is an overlap, otherwise 'NO'. Example: Input: 3 1 3 2 4 5 7 Output: YES

Key concepts

intervalsoverlapscheduling

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
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.