union find

来源:互联网 发布:天干地支算法年月日 编辑:程序博客网 时间:2024/05/16 05:39

leetcode 323

numbers of island  1 2

关于集合合并,判断在不在同一个集合中,要想到并查集。

原创粉丝点击