Tap here to switch tabs
Problem
Submissions

Problem: Determine if Two Events Have Conflict

Determine if Two Events Have Conflict checks two events given as HH:MM start and end times, returning whether their time ranges overlap, including when they meet at one exact time.

Statement

You are given two arrays of strings event1 and event2, where event1 = [startTime1, endTime1] and event2 = [startTime2, endTime2]. Each string represents a time of day in the HH:MM format.

A conflict occurs if the two events have any time in common, including a single point in time.

Return true if there is a conflict between the two events, otherwise return false.

Constraints:

  • event1.length ==== event2.length ==2== 2

  • event1[i].length ==== event2[i].length ==5== 5

  • startTime_1 ≤\leq endTime_1

  • startTime_2 ≤\leq endTime_2

  • All the event times follow the HH:MM format.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Determine if Two Events Have Conflict

Determine if Two Events Have Conflict checks two events given as HH:MM start and end times, returning whether their time ranges overlap, including when they meet at one exact time.

Statement

You are given two arrays of strings event1 and event2, where event1 = [startTime1, endTime1] and event2 = [startTime2, endTime2]. Each string represents a time of day in the HH:MM format.

A conflict occurs if the two events have any time in common, including a single point in time.

Return true if there is a conflict between the two events, otherwise return false.

Constraints:

  • event1.length ==== event2.length ==2== 2

  • event1[i].length ==== event2[i].length ==5== 5

  • startTime_1 ≤\leq endTime_1

  • startTime_2 ≤\leq endTime_2

  • All the event times follow the HH:MM format.