Introduction - If you have any usage issues, please Google them yourself
The concept and implementation of Kruskal algorithm for minimum spanning tree
The essence of Kruskal algorithm lies in:
Select one edge at a time.
At the same time, it satisfies: 1, the minimum weight in the current unselected edge; 2, and the selected side does not constitute the loop.
Until the N-1 table is selected, the algorithm is finished. Find MST alive and judge that there is no MST.