My implementation is used to solve SPOJ 3188. Minimum Spanning Tree MST, and is in git and below:

# Prim’s Algorithm & Pairing Heap

The following is an implementation of Prim’s algorithm (Wikipedia) using a pairing heap (Wikipedia). This is a greedy algorithm used to find a weighted undirected graph’s minimum spanning tree (Wikipedia).

Pingback: Kruskal’s Algorithm & Quick Union | Derek Illchuk - Computations