Mental Model
We find groups of nodes where each node can reach any other node in the same group by walking through edges. BFS helps explore each group fully before moving to the next.
Analogy: Imagine a party where people hold hands forming groups. BFS is like starting from one person and visiting everyone connected by holding hands until the whole group is found, then moving to another group.
Graph: 0 -> 1 | 2 Groups: [0,1,2] [3,4] Adjacency list: 0 -> [1,2] 1 -> [0] 2 -> [0] 3 -> [4] 4 -> [3]
