My implementation to Prim's Algo that finds a minimum spanning tree for a weighted undirected graph. The algorithm is in Graph class.
there is also addedEdgeToMST() function that for a given Edge that was added to previously mst graph, it returns a new MST in O(|E|).