Prim Algorithm
Prim's algorithm is a greedy algorithm for finding a minimum spanning tree of a connected, weighted graph by starting from an arbitrary vertex and repeatedly adding the cheapest edge that connects a vertex already in the tree to one that isn't.
5 resources across 2 libraries
Glossary Terms(4)
Union-Find Algorithm
Union-Find (also called Disjoint-Set Union or DSU) is a data structure that efficiently tracks a collection of disjoint sets, supporting two core operations: f…
Minimum Spanning Tree
A Minimum Spanning Tree (MST) is a subset of edges from a connected, weighted, undirected graph that connects all vertices together, without cycles, at the min…
Kruskal Algorithm
Kruskal's algorithm is a greedy algorithm for finding a minimum spanning tree of a connected, weighted graph by sorting all edges by weight and adding each one…
Prim Algorithm
Prim's algorithm is a greedy algorithm for finding a minimum spanning tree of a connected, weighted graph by starting from an arbitrary vertex and repeatedly a…