Problem context and objectives
Mission briefing
Game event engineer · Actions arrive faster than the world can resolve them
Process events in the exact order promised by the data structure: The Signal Turnstile.
The wrong removal order changes gameplay and creates impossible replays.
How you win
- 1Recognize when Time-window queue matches the clues
- 2Keep this true after every move: the queue contains exactly the arrivals inside the current time window
- 3Reach the result within O(n)
Rules and pressure
- Target cost: O(n)
- State rule: the queue contains exactly the arrivals inside the current time window
New words in this mission
Open a term for a plain-language explanation.durable queue+
A waiting line that keeps work until a consumer finishes it. It absorbs bursts and lets failed work be retried.
Lesson 1 of 3
Each timestamp enters at the back. The boundary advances and only expired front timestamps leave. A signal exactly on the boundary is still live.
Your call · At time 3001 with window 3000, what happens to timestamp 1?