Graph Breadth-First Traversal
Visit every node reachable from a start node in breadth-first order over directed edges, visiting neighbors in ascending order and reporting each node's depth.
Description
Traverse all nodes reachable from a start node in breadth-first order and report minimum edge depth.
Graph Breadth-First Traversal traverse all nodes reachable from a start node in breadth-first order and report minimum edge depth.
Use this for unweighted reachability, layer discovery, shortest edge-count distances, and deterministic graph walkthroughs.
When to use Graph Breadth-First Traversal
Use this for unweighted reachability, layer discovery, shortest edge-count distances, and deterministic graph walkthroughs.
How it works
A FIFO queue visits the start, then every unvisited neighbor layer by layer. The normalized adjacency order makes visit order deterministic.
Interpreting the result
Keep the input units, direction conventions, encoding, and ordering rules visible when reusing the result. Preserve the full returned value for downstream calculations and round only for presentation.
Assumptions and limitations
Only nodes reachable from the start are returned. Edges are directed, depth counts edges rather than weights, and a different neighbor order can produce a different valid traversal order.