There are n cities. Return the total number of provinces (connected components).
[
[
[
1,
1,
0
],
[
1,
1,
0
],
[
0,
0,
1
]
]
]2[
[
[
1,
0,
0
],
[
0,
1,
0
],
[
0,
0,
1
]
]
]3[
[
[
1,
1,
1
],
[
1,
1,
1
],
[
1,
1,
1
]
]
]1Sign in to Run Code and Submit