Search⌘ K
AI Features

Solution: Reschedule Meetings for Maximum Free Time I

C# solution for the Reschedule Meetings for Maximum Free Time I problem using the Sliding Window pattern.

Statement

You are given an event that runs from time 00 to time eventTime. There are n non overlapping meetings scheduled during the event, where meeting i occupies the half open interval from startTime[i] to endTime[i].

You may reschedule at most k meetings by changing their start and end times, but each rescheduled meeting must keep the same duration endTime[i] - startTime[i] and must still lie entirely within the event interval [0,[0, ...