For Educators · Graph Traversal
Graph Traversal for a sensor mesh
Built for educators teaching it to a class. Drop a live demo into a lecture or assign it as a shareable link — no lab installs. Simulate a sensor mesh live below — adjust the inputs and watch it respond, right in your browser.
Graph Traversal (BFS / DFS)Live
breadth vs depth
Controls
The two ways to explore a graph. Breadth-first search fans out level by level using a queue, visiting all near nodes before far ones — ideal for shortest paths. Depth-first search plunges as deep as possible using a stack, backtracking when stuck — ideal for cycle detection and topological sorting. Watch the numbered visit order differ.
Data Inspector
ModeBFS
Structurequeue (FIFO)
Nodes9
Governing equation
Reading this result: BFS uses a FIFO queue, so it fully visits every node at distance 1 before any at distance 2 — that level-by-level order is exactly why it finds shortest paths in unweighted graphs.
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
Also for:StudentsResearchersEngineersHobbyists & MakersK-12 StudentsFirst RespondersGeneral version →
More with Graph Traversal
Frequently asked questions
- Is this good for educators?
- Yes — this version of "Graph Traversal for a sensor mesh" is framed for educators teaching it to a class. Drop a live demo into a lecture or assign it as a shareable link — no lab installs.
- Do I need to install anything?
- No. It runs in any modern browser, free, with no account required.