Breadth-First Search
This video presents the same text shown beside it, spoken and on screen. It adds nothing the text does not say.
State
Breadth-first search traverses a graph level by level, exploring every neighbor before any neighbor's neighbor, visiting each vertex once in correct level order — cost likewise in O(V plus E).
Show
A rumor spreading through a school reaches every direct friend before any friend-of-a-friend.
Watch for
Level order is the promise depth-first never makes.
Builds on
Unlocks
- Nothing yet depends on this.