You are given two lists of availability time intervals, slots1 and slots2, where each interval is represented as [start, end]. You are also given an integer duration representing the required length of a meeting.
Return the earliest time interval [meetingStart, meetingEnd] such that:
the meeting fits entirely within an interval from slots1 and within an interval from slots2, and meetingEnd - meetingStart = duration.
If no such time interval exists, return an empty list.
Constraints:
slots1.length, slots2.length
slots1[i].length slots2[i].length
slots1[i][0] slots1[i][1]
slots2[i][0] slots2[i][1]
slots1[i][j], slots2[i][j]
duration
You are given two lists of availability time intervals, slots1 and slots2, where each interval is represented as [start, end]. You are also given an integer duration representing the required length of a meeting.
Return the earliest time interval [meetingStart, meetingEnd] such that:
the meeting fits entirely within an interval from slots1 and within an interval from slots2, and meetingEnd - meetingStart = duration.
If no such time interval exists, return an empty list.
Constraints:
slots1.length, slots2.length
slots1[i].length slots2[i].length
slots1[i][0] slots1[i][1]
slots2[i][0] slots2[i][1]
slots1[i][j], slots2[i][j]
duration