*323. Connected Component in Undirected Graph
https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/
solution
bfs: 计算无向图的独立部分
时间复杂度:O(V+E) 空间复杂度:O(V+E)
dfs
union find
Last updated
https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/
bfs: 计算无向图的独立部分
时间复杂度:O(V+E) 空间复杂度:O(V+E)
dfs
union find
Last updated