Minimum Spanning Tree

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 list
Priority queue
O ( (E+V) log (V) )
Weighted undirected graph Kruskal’s Algorithm Edge list
Disjoint-set
O ( E log V )


© 2019-2026 Algotree.org | All rights reserved.

This content is provided for educational purposes. Feel free to learn, practice, and share knowledge.
For questions or contributions, visit algotree.org

"Java is to JavaScript what car is to carpet. - Chris Heilmann"