prims adjacency list Algorithm

Therefore, it is also sometimes named the Jarník's algorithm, Prim – Jarník algorithm, Prim – Dijkstra algorithm or the DJP algorithm. However, for graphs that are sufficiently dense, Prim's algorithm can be made to work in linear time, meeting or better the time boundary for other algorithms.

prims adjacency list source code, pseudocode and analysis