A Minimum Spanning Tree is a subset of connected edges in a weighted undirected graph such that all the vertices of the graph are connected and the total weight of the edges is minimum.
Abstract Data Type | Algorithm | Data Structure Used | Time Complexity |
---|---|---|---|
Weighted undirected graph | Prim’s Algorithm C++ Python Java | Adjacency listPriority queue | O ( (E+V) log (V) ) |
Weighted undirected graph | Kruskal’s Algorithm | Edge listDisjoint-set | O ( E log V ) |