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
O ( E log V )

Copyright (c) 2019-2023,
All rights reserved.