Dsa
Graphs Dfs
Medium
Conference Room Allocation
You are responsible for scheduling sessions for a conference. Each session has a start time and end time. Given a list of sessions, your task is to determine the maximum number of sessions that can be accommodated in the conference rooms, given that sessions cannot overlap.
Input format:
- The first line contains an integer N (1 <= N <= 1000), the number of sessions.
- The next N lines contain two integers each, start and end time (0 <= start < end <= 24).
Output format:
- A single integer representing the maximum number of non-overlapping sessions.
Example:
Input:
3
1 3
2 4
3 5
Output:
2
Key concepts
graphsdfsgraph_traversal
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