Name:
Kruskal's Algorithm
Description:
Function:
to find the minimum spanning tree of a graph
Time complexity:
O(m log(m))
Space complexity
O(m)
Important tips:
- The graph can contain edges with negative length.
- Remember to check whether the graph is connected.
- It is a good idea to use DSU to decide connectivity, so that high efficiency can be achieved.
More information
wikipedia link
Image