Concept Flow - Connected Components Using BFS
Start with all nodes unvisited
Pick an unvisited node
Initialize BFS queue with this node
While queue not empty
Dequeue node
Mark node visited, add to current component
Enqueue all unvisited neighbors
Repeat until queue empty
One connected component found
Repeat for next unvisited node
All nodes visited -> Done
We find connected components by repeatedly running BFS from unvisited nodes, marking all reachable nodes as one component.
