Dsa
Intervals
Warm-up
Classroom Booking Conflicts
You are given a list of classroom bookings defined by start and end times. Your goal is to identify any conflicts where two or more bookings overlap. Input begins with an integer n followed by n lines of 'start end' for each booking. If no conflicts are detected, output 'No Conflicts', otherwise output the conflicting bookings.
Example:
Input:
3
09:00 10:30
09:15 10:00
10:30 11:00
Output:
Conflict between 1 and 2
Key concepts
intervalsconflictsscheduling
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