For a given integer, n, and an array, edges, return the number of connected components in a graph containing n nodes.
Note: The array edges[i] = [x, y] indicates that there’s an edge between x and y in the graph.
Constraints:
1≤ n ≤2000
1≤ edges.length ≤5000
edges[i].length ==2
0≤ x ≤ y < n
x ...