树与等价查并集实现代码
并查集实现:普通算法、稚压缩、压缩路径。
Linux下查并集运行结果。
---------PleaseSelectyouchoice:----------
1Entertherelation!
2Finditsroot!
3Finditsrelations!
0Quite!
Yourchoiceis:3
Pleaseenterthenumberyouwanttoknow:
18
YES,1and8havethesameroot!
下载地址
用户评论