Dsa
Intervals
Easy
Detect Conflict in Event Scheduling
You are organizing a series of events and need to ensure that no two events overlap. Write a program to check if any scheduled events conflict with each other.
Input:
- The first line contains an integer e (1 <= e <= 100), the number of events.
- Each of the next e lines contains two integers each, representing the start and end times of an event (0 <= start < end <= 10000).
Output:
- Print "Conflict" if there are any overlapping events, otherwise print "No Conflict".
Example Input:
3
1 4
2 5
5 8
Example Output:
Conflict
Key concepts
intervalsconflictboolean
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