Question bank › Intervals
Dsa Intervals Warm-up

Count Non-Overlapping Intervals

Given a list of intervals, count how many of them are non-overlapping. Each interval is represented as a pair of integers [start, end]. The input ends with a single line containing 'end'. For example: Input: [1, 2] [2, 3] [3, 5] [4, 6] end Output: 3

Key concepts

intervalscountingnon-overlapping

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.