Problem context and objectives
Mission briefing
Portal network mechanic · Travel portals are connected as a one-way chain
Repair the links without losing the unexplored route: The Braided Chains.
Overwrite one next pointer too early and the rest of the expedition becomes unreachable.
How you win
- 1Recognize when Sorted list merge matches the clues
- 2Keep this true after every move: the merged prefix is sorted and contains exactly the consumed nodes
- 3Reach the result within O(n + m)
Rules and pressure
- Target cost: O(n + m)
- State rule: the merged prefix is sorted and contains exactly the consumed nodes
Lesson 1 of 3
Both chains are sorted, so the next globally smallest node must be one of the two fronts.
Your call · The fronts are 3 and 2. Which enters the braid?