Define Prim's Algorithm
Prim's algorithm is a greedy algorithm for constructing a minimum spanning tree of a weighted linked graph. It works by attaching to a before constructed sub tree a vertex to the vertices already in the tree.