MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / printMST

Method printMST

Programs/PrimsAlgorithm.java:30–35  ·  view source on GitHub ↗
(int parent[], int graph[][])

Source from the content-addressed store, hash-verified

28 // A utility function to print the constructed MST stored in
29 // parent[]
30 void printMST(int parent[], int graph[][])
31 {
32 System.out.println("Edge \tWeight");
33 for (int i = 1; i < V; i++)
34 System.out.println(parent[i] + " - " + i + "\t" + graph[i][parent[i]]);
35 }
36
37 // Function to construct and print MST for a graph represented
38 // using adjacency matrix representation

Callers 1

primMSTMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected