Commit 5535d5ad authored by anqiwa's avatar anqiwa 😲
Browse files

add 684 1

parent 8ef71992
......@@ -9,4 +9,4 @@
[547.friend circles/ number of provinces](https://gitlab.eecs.umich.edu/anqiwa/myleetcodesolu/-/tree/master/Union_Find/547.Friend-Circles) (M)
[648.redundant connection]()
\ No newline at end of file
[648.redundant connection](https://gitlab.eecs.umich.edu/anqiwa/myleetcodesolu/-/tree/master/Union_Find/684.Redundant-Connection) (M-)
\ No newline at end of file
# 684 Redundant Connection
这题十分好像,就是用union find的套路走流程就可以做出, 是对加强union find 套路掌握很好的练习,union find的基本模板可以参考 ```lc547```
这题十分直接用union find的套路走流程就可以做出, 是对加强union find 套路掌握很好的练习,union find的基本模板可以参考 ```lc547```
基本思路:
## 基本思路:
每看到一个edge,如果两个点不是在同一个 ```connected component```, 就把他们用union合并成在一个 connected componen; 如果两个点已经在同一个 connected component 了, 则当前的 edge e 为多余,直接 return 他就好了
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment