Practice Determine if Two Events Have Conflict
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
event1 and event2 each contain [startTime, endTime] in valid 24-hour HH:MM format on the same day. Their endpoints are inclusive. Return whether the two intervals share any moment, including a common endpoint.
Source: Determine if Two Events Have Conflict on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
event1 = ["01:15","02:00"], event2 = ["02:00","03:00"]
Output
true
# Example 2
Input
event1 = ["01:00","02:00"], event2 = ["01:20","03:00"]
Output
true
# Example 3
Input
event1 = ["10:00","11:00"], event2 = ["14:00","15:00"]
Output
false
Constraints
event1.length == event2.length == 2
event1[i].length == event2[i].length == 5
startTime1 <= endTime1
startTime2 <= endTime2
All the event times follow the HH:MM format.
Related LeetCode Problems
Practice more problems similar to Determine if Two Events Have Conflict.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.