Search⌘ K
AI Features

Solution: Meeting Scheduler

C# solution for the Meeting Scheduler problem using the Two Pointers pattern.

Statement

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:

  • 11 \leq ...