prim's algorithm

Prim's algorithm is a greedy algorithm used to find the minimum spanning tree of a weighted graph. It starts with an arbitrary vertex and gradually grows the tree by adding the edge with the smallest weight that connects a vertex in the tree to a vertex outside the tree. The algorithm continues this process until all the vertices are included in the tree, resulting in a minimum spanning tree.

Requires login.