A connected component of a graph is a subset of vertices in which there is a path connecting any two vertices.