Question bank › Binary Search
Dsa Binary Search Medium

Event Time Conflict Check

You have a sorted list of event start times for a day. A new event is proposed with a start time. Determine if this new event will conflict with any existing events based on start and end times. An event conflicts if its start time is less than the end time of any ongoing event. Assume each event lasts for one hour. Implement a function to find out if the new event can be scheduled without conflicts. Input Format: - The first line contains an integer N, the number of events. - The second line contains N space-separated integers representing the sorted start times of the events. - The third line contains the proposed start time of the new event. Output Format: - Print 'Conflict' if there is a conflict or 'No Conflict' if the new event can be scheduled. Example: Input: 5 1 3 5 7 9 4 Output: Conflict

Key concepts

binary_searchtime_managementscheduling

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.