Problem context and objectives
Mission briefing
Live-ops game engineer · A multiplayer arena is reporting bursts of lag
Find the smallest or strongest contiguous time window: The Spectrum Key.
Scanning the entire history after every event cannot keep up with live players.
How you win
- 1Recognize when Minimum covering window matches the clues
- 2Keep this true after every move: formed counts how many required character frequencies are currently satisfied
- 3Reach the result within O(n)
Rules and pressure
- Target cost: O(n)
- State rule: formed counts how many required character frequencies are currently satisfied
Lesson 1 of 3
Each required frequency is a lock. Expand until every lock is lit, then record and shrink while the cover remains valid.
Your call · Every lock is lit. What happens next?