Problem context and objectives
Mission briefing
Clockwork game engineer · A tournament scoreboard has jammed
Restore the order before the next round begins: Order the Gears.
A wrong ordering changes who advances, while a slow repair freezes every active match.
How you win
- 1Recognize when Sorting and partitioning matches the clues
- 2Keep this true after every move: the processed prefix is sorted
- 3Reach the result within O(n log n)
Rules and pressure
- Target cost: O(n log n)
- State rule: the processed prefix is sorted
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
Split the array through its middle until only one-gear pieces remain. On the way back, merge two sorted feeder lanes.
Your call · Where does [5,1,4,2] split at its midpoint?