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 Nested Rune Decoder.
The wrong removal order changes gameplay and creates impossible replays.
How you win
- 1Recognize when Nested context stack matches the clues
- 2Keep this true after every move: each stack frame stores the exact outer text and repeat count waiting for a closing bracket
- 3Reach the result within O(n + C), including intermediate copies
Rules and pressure
- Target cost: O(n + C), including intermediate copies
- State rule: each stack frame stores the exact outer text and repeat count waiting for a closing bracket
Lesson 1 of 3
Keep outer and inner contexts separate. The most recently saved frame finishes first.
Your call · After the inner ] in 3[a2[c]], what are current and the remaining saved frame?