Computing Connected Components
Problems:
- how many connected subgraphs are there?
- are two vertices in the same connected subgraph?
Both of the above can be solved if we can
- build an array, one element for each vertex V
- indicating which connected component V is in
-
componentOf[] … array [0..nV-1] of component IDs
|