Question bank › Intervals
Dsa Intervals Easy

Count Room Overlaps

You are managing a conference room booking system, and you want to count how many bookings overlap at any point in time. Input: - The first line contains an integer b (1 <= b <= 500), the number of bookings. - Each of the next b lines contains two integers representing the start and end time of each booking (0 <= start < end <= 10000). Output: - Print a single integer which is the maximum number of overlapping bookings at any given time. Example Input: 3 1 4 2 5 3 6 Example Output: 3

Key concepts

intervalscountingoverlaps

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.