Computer Science / CS 0151 · Atom · ~20 seconds
Breadth-First Search
Video not yet published
to the StudyWalks catalog
to the StudyWalks catalog
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.