Update 6.5最小生成树(Prim算法、Kruskal算法).md

This commit is contained in:
岩岩
2022-03-29 11:39:07 +08:00
committed by GitHub
parent 67fa0236bf
commit 4427d3c511

View File

@@ -30,9 +30,9 @@
每轮遍历**isJoin**数组,第一遍找到**lowCost**最低的顶点,然后加入;第二遍循环遍历更新各点的**lowCost**值。
`时间复杂度`=$$O(|V|^2)$$,适合`边稠密图`
![1638175026761](F:\408数据结构\图片\1638175026761.png)
![1638175026761](https://github.com/oxyanyano/2022-WangDao-CS-DS-Notes/blob/main/images/1638175026761.png)
![1638175026757](F:\408数据结构\图片\1638175026757.png)
![1638175026757](https://github.com/oxyanyano/2022-WangDao-CS-DS-Notes/blob/main/images/1638175026757.png)
### 三、Kruskal算法克鲁斯卡尔算法