Concepts2
βοΈAlgorithmIntermediate
Minimum Spanning Tree - Prim
Prim's algorithm builds a Minimum Spanning Tree (MST) by growing a tree from an arbitrary start vertex, always adding the lightest edge that connects the tree to a new vertex.
#prim#minimum spanning tree#mst+12
βοΈAlgorithmIntermediate
Minimum Spanning Tree - Kruskal
Kruskalβs algorithm builds a minimum spanning tree (MST) by sorting all edges by weight and greedily picking the next lightest edge that does not form a cycle.
#kruskal#minimum spanning tree#mst+11