bfs_search
Finds shortest unweighted paths and reachable node counts in a graph via breadth-first search. Returns visit order and optional target path.
Instructions
Breadth-first search on a graph. Finds shortest unweighted path, visit order, and reachable node count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | Yes | Array of edges | |
| start | Yes | Start node | |
| target | No | Optional target node to find path to | |
| directed | No | Whether the graph is directed (default true) |