Question bank › Intervals
Dsa Intervals Easy

Interval Popularity

Given a list of time intervals when various events occur, determine how many events are underway at any given time. An interval is defined as [start, end]. Your task is to create a program that prints the maximum number of overlapping events at any point in time. Input format: - The first line contains an integer n, the number of intervals. - The following n lines each contain two integers representing the start and end times of each event. Output format: - Print the maximum number of overlapping events as an integer. Example: Input: 4 1 3 2 5 3 4 6 8 Output: 3

Key concepts

intervalspopularitycounting

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