To solve this, I first calculated the duration of each meeting. My goal was to find the maximum continuous free time that can exist after rescheduling at most one meeting to a different valid time slot.
I iterated over each meeting and considered removing it from its original slot. Then, I tried inserting it into any valid gap between the remaining meetings, including at the very beginning or end of the event window. For each valid rescheduling, I recomputed the free time gaps and tracked the maximum possible value across all such reschedules.
This approach failed (557/695) so I went to the editiorial
