G to represent the graph, where G[i] contains the neighbors of vertex i.visited to keep track of visited vertices.ccc to count the number of complete connected components.i from 0 to n-1:
a. If i is not visited, perform DFS starting from i.
b. In DFS, increment the vertex count v and the edge count ce (since each edge is counted twice).
c. After the DFS, check if ce is equal to v * (v - 1) (since each edge is counted twice).
d. If the condition is true, increment ccc.ccc.