Starter track
Step 6 of 60 / 6 completeAlgorithms and Search Foundations
Earlier steps still set up Frontier and Visited State on Graphs.
Previous step: Depth-First Search and Backtracking Paths.
Concept module
Keep repeat skips, waiting frontier nodes, and already-expanded nodes visible together so cycle handling feels like honest bookkeeping on one graph bench.
Interactive lab
Loading the live simulation bench.
Progress
Not startedMastery: NewLocal-firstStart exploring and Open Model Lab will keep this concept's progress on this browser first. No finished quick test, solved challenge, or completion mark is saved yet.
Try this setup
Jump to a named bench state or copy the one you are looking at now. Shared links reopen the same controls, graph, overlays, and compare context.
Saved setups
Premium keeps named exact-state study setups in your account while stable concept links stay public below.
Checking saved setup access.
This concept can keep using stable links while the saved-setups capability resolves for this browser.
Copy current setup
Stable concept and section links stay public below while exact-state setup sharing stays behind premium.
Stable links
Starter track
Step 6 of 60 / 6 completeEarlier steps still set up Frontier and Visited State on Graphs.
Previous step: Depth-First Search and Backtracking Paths.
Why it behaves this way
On a graph with cycles, the frontier and the visited state are not the same thing. The frontier holds nodes that have already been claimed but are still waiting to be expanded. The visited state marks nodes whose neighborhoods have already been used.
That separation is what stops graph traversal from wasting time on the same loop over and over. This bench keeps repeat skips, frontier size, and visited nodes visible together so cycle handling feels like visible bookkeeping rather than hidden magic.
Key ideas
Frozen walkthrough
Premium unlocks saved study tools, exact-state sharing, and the richer review surfaces that support this guided flow.
View plansBridge cycle
claimed but waiting
already expanded
1. Read the frontier honestly
2. Read the visited role honestly
3. Read the cycle consequence
Cycle-control read
Common misconception
Frontier and visited state are basically the same set with two different names.
A frontier node has been claimed but not expanded yet. A visited node has already had its neighborhood used.
That difference is exactly what makes repeat skips and clean backtracking possible on looped graphs.
Mini challenge
Make a prediction before you reveal the next step.
Check your reasoning against the live bench.
Quick test
Reasoning
Question 1 of 2
Use the live bench to test the result before moving on.
Accessibility
The simulation shows one labeled graph with the current node, the frontier nodes, and the visited nodes colored differently so waiting work and finished work stay separate.
A readout card reports the traversal mode, current node, frontier size, visited count, and target, while a cue panel shows the frontier order and the current neighbor list.
Graph summary
One graph tracks visited nodes against frontier size, a second tracks current depth against the deepest claimed depth, and a third compares new discoveries with repeat skips.
Together they show how cycle-handling depends on keeping frontier and visited state distinct.
Keep frontier and visited state separate when cycles appear
Open the next concept, route, or track only when you want the current model to widen into a larger branch.
Watch sorting as visible work on a live list so input order, comparisons, and writes stay concrete instead of collapsing into one final answer.
Keep an ordered list, the low-mid-high markers, and the shrinking interval visible together so binary search feels visual instead of procedural.
Keep the stack frontier, current depth, and branch order visible together so depth-first search feels like disciplined backtracking instead of random wandering.