Neocortex 🧠

Search

Search IconIcon to open search

Breadth First Search

Last updated Jan 24, 2022 Edit Source

Breadth first search, or Breadth First Traversal, similar to Depth-First Search is a traversal algorithm for Graphs. I works in rounds, by splitting the graph into levels strarting from the start node $s$. A visual should be more than enough to explain it:

Breadth first search runs in $O(n+m)$ for a graph with $n$ vertices and $m$ edges.


Interactive Graph