Prim's Algorithm
What is Prim's Algorithm?
Prim's Algorithm is used to find a minimum
spanning tree in a connected, weighted,
undirected graph.
How It Works
- Choose any vertex to start.
- Find the lowest-weight edge connecting
the tree to a new vertex.
- Add that edge and vertex to the tree.
- Repeat until all vertices are included.
Example
Learn more about Prim's Algorithm