Problem context and objectives
Mission briefing
Expedition navigator · Safe camps and hazards form a connected world map
Find a valid route while marking every place already explored: All Routes to the Core.
Without visited state, the party loops forever or revisits expensive terrain.
How you win
- 1Recognize when All paths in a directed acyclic graph matches the clues
- 2Keep this true after every move: path is exactly the active source-to-current route and result contains every completed route explored so far
- 3Reach the result within O(total output length) time and O(V) recursion space
Rules and pressure
- Target cost: O(total output length) time and O(V) recursion space
- State rule: path is exactly the active source-to-current route and result contains every completed route explored so far
New words in this mission
Open a term for a plain-language explanation.snapshot+
A saved checkpoint of current state. After a crash or reconnect, the system restores this checkpoint instead of rebuilding everything from the beginning.
Lesson 1 of 3
Extend a route to the target and retract the thread on every return.
Your call · After recording path [0,1,3], what must be removed before exploring node 2?