Problem context and objectives
Mission briefing
Clockwork game engineer · A tournament scoreboard has jammed
Restore the order before the next round begins: Merge Conveyor.
A wrong ordering changes who advances, while a slow repair freezes every active match.
How you win
- 1Recognize when Merge step matches the clues
- 2Keep this true after every move: the output contains the smallest consumed values in sorted order
- 3Reach the result within O(n + m)
Rules and pressure
- Target cost: O(n + m)
- State rule: the output contains the smallest consumed values in sorted order
Lesson 1 of 3
Both inputs are already sorted. Therefore the next global minimum must be one of the two fronts.
Your call · The fronts are 3 and 2. Which crate is next?