Implementation of different versions of Prim's algorithm, a naive one and a more advanced one involving binary heaps.
For instance, with the graph defined here in edges.txt, we get the following result:
Execution time (binary heap): 0.00450897216796875 seconds Sum of edge costs in MST (binary heap): -3612829 Execution time (naive): 0.39385294914245605 seconds Sum of edge costs in MST (naive) -3612829