Prim’s Algorithm
Greedy algorithm for finding a minimum spanning tree.
Prim algorithm
Prim’s algorithm is a greedy algorithm used to find the minimum spanning tree (MST) for a weighted, undirected graph. It starts with an arbitrary vertex and iteratively adds the shortest edge connecting the current MST to a vertex outside of it until all vertices are included. The result is a subgraph that connects all vertices with the minimum possible total edge weight.
Built by Tim Jones