Fewest Reboots That Land Inside Every Patch Tuesday Window
Last updated: November 29, 2026
Quick Overview
Each Windows Server host has an allowed reboot window [start, end] on Patch Tuesday. A single orchestrated reboot at time t covers every host whose window contains t. Return the minimum number of reboot times needed so every host reboots within its window.
Microsoft
November 29, 20260
0
0 solved
Each Windows Server host has an allowed reboot window [start, end] on Patch Tuesday. A single orchestrated reboot at time t covers every host whose window contains t. Return the minimum number of reboot times needed so every host reboots within its window.
A greedy interval stabbing problem in the style of Microsoft onsites, framed around Windows Update orchestration. The interviewer checks that you sort by end time, explain the exchange argument for why that greedy is optimal, and handle closed interval boundaries.
What the Interviewer Expects
- Recognize the minimum stabbing points problem
- Sort windows by end time
- Place a reboot at the earliest end not yet covered
- Skip all windows containing the current reboot time
- Justify optimality with an exchange argument
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you return the actual reboot times and which hosts each one covers?
- What if each reboot can handle at most C hosts?
- How does the answer change if windows are half-open?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: list of [start, end] windows, closed on both ends. Output: smallest number of points such that every window contains at least one point. An empty fleet needs 0 reboots....
High-Level Design
Sort windows by end. Keep last, the time of the most recent reboot, starting at negative infinity. For each window in end order, if start > last, it is not yet covered, so schedule a reboot at its...