Algorithms, Depth First Search, Breadth First Search, Graph, Data Structures.
to x, then v connected to x In simple words, a connected component is a maximal set of connected vertices. Algorithm a) Initialize all vertices v as unmarked. b) For each unmarked vertex v, run DFS to identify all vertices discovered as part of the same component. Connected-Components API