Prim's Algorithm
- Create an array or a min heap named 'visited'.
- Select one node and add it to 'visited'.
- Select one minimum weighted edge that is connected to the selected node.
- Add the node to 'visited' which is connected to the selected edge.
- Select a minimum weighted edge that connects one node that is in 'visited' and another node that is not in 'visited'.
- Repeat step 4 and 5 until all nodes are in 'visited'.
more important info