Question bank › Intervals
Dsa Intervals Easy

Interval Overlap Check

You are given a list of intervals, where each interval is represented as a pair of integers [start, end]. Write a program to determine if there are any overlapping intervals. An overlapping interval is defined as two intervals that share at least one point. If there are overlapping intervals, print 'True', otherwise print 'False'. Input format: - First line contains an integer n (1 ≤ n ≤ 100): number of intervals. - Next n lines each contain two integers start and end, separated by a space (0 ≤ start < end ≤ 10^9). Output format: - Print 'True' if there are overlapping intervals, otherwise print 'False'. Example: Input: 3 1 3 2 4 5 7 Output: True

Key concepts

intervalsoverlapsboolean

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.