Concept Flow - Connected Components Using BFS
Start with all nodes unvisited
Pick an unvisited node
Initialize queue with this node
While queue not empty
Dequeue node
Mark node visited
Add unvisited neighbors to queue
Repeat until queue empty
One connected component found
Repeat for next unvisited node
All nodes visited, done
Start from an unvisited node, use BFS to find all nodes connected to it, mark them visited, then repeat for other unvisited nodes until all are covered.
