Count Connected Components
There is an undirected graph with n nodes. There is also an edges array, where edges[i] = [a, b] means that there is an edge between node a and node b in the graph.
Return the total number of connected components in that graph.
Example 1:
Input:
n=3
...
yesicbap.hashnode.dev1 min read