Question bank › Intervals
Dsa Intervals Easy

Max Interval Size

Given a list of intervals, find the size of the largest interval. The size of an interval is defined as the difference between its start and end values. Include intervals that may have different boundaries to find the largest one. Input: N start1 end1 start2 end2 ... Output: Size of the largest interval as an integer. Example: Input: 3 3 5 7 8 1 9 Output: 8

Key concepts

intervalssize calculationsorting

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.