Concept Flow - Connected Components Using BFS
Start with graph and unvisited nodes
Pick an unvisited node
Initialize BFS queue with this node
While queue not empty
Dequeue node -> Mark visited
Add unvisited neighbors to queue
Repeat until queue empty
One connected component found
Repeat for next unvisited node
All nodes visited -> Done
Start BFS from an unvisited node, visit all reachable nodes marking them visited, then repeat for remaining unvisited nodes to find all connected components.
