Problem context and objectives
Mission briefing
Clockwork game engineer · A tournament scoreboard has jammed
Restore the order before the next round begins: The Pivot Oracle.
A wrong ordering changes who advances, while a slow repair freezes every active match.
How you win
- 1Recognize when Quickselect partition matches the clues
- 2Keep this true after every move: the target rank remains inside the live partition
- 3Reach the result within O(n) average
Rules and pressure
- Target cost: O(n) average
- State rule: the target rank remains inside the live partition
New words in this mission
Open a term for a plain-language explanation.partition or shard+
One slice of a larger dataset or workload. Splitting work raises capacity, but cross-slice operations become harder.
Lesson 1 of 3
After partitioning, the pivot locks into its final sorted rank. Discard the entire side that cannot contain k.
Your call · The pivot locks at rank 4 while k=2. Which side stays live?