Reschedule Meetings for Maximum Free Time I - Problem
Meeting Scheduler Challenge: You're managing a busy schedule during an event that runs from
Here's the twist: you can reschedule at most k meetings by moving their start times (while keeping the same duration) to create the longest possible continuous block of free time. However, there are important constraints:
• Relative order must be preserved - you can't swap meetings around
• Meetings must remain non-overlapping
• All meetings must stay within the event timeframe
Your goal is to find the maximum amount of continuous free time you can create by strategically rescheduling up to k meetings. Think of it as Tetris for your calendar - how can you rearrange the pieces to create the biggest gap?
t = 0 to t = eventTime. You have n non-overlapping meetings already scheduled, where the i-th meeting runs from startTime[i] to endTime[i].Here's the twist: you can reschedule at most k meetings by moving their start times (while keeping the same duration) to create the longest possible continuous block of free time. However, there are important constraints:
• Relative order must be preserved - you can't swap meetings around
• Meetings must remain non-overlapping
• All meetings must stay within the event timeframe
Your goal is to find the maximum amount of continuous free time you can create by strategically rescheduling up to k meetings. Think of it as Tetris for your calendar - how can you rearrange the pieces to create the biggest gap?
Input & Output
Constraints
💡
Explanation
AI Ready
💡 Suggestion
Tab
to accept
Esc
to dismiss
// Output will appear here after running code