Question bank › Intervals
Dsa Intervals Easy

Frequency Guard

A radio receiver operates in the range [0, MaxFreq]. Several high-power transmitters are emitting interference in specific ranges [start, end]. Calculate the total available bandwidth (the sum of all segments in [0, MaxFreq]) that is NOT covered by any interference range. Example: Input: N=2, MaxFreq=100 Interference: [10, 30], [25, 45] Merged Interference: [10, 45] Available: [0, 10] and [45, 100] Total: 10 + 55 = 65.

Key concepts

intervalsmergingcomplement

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.