MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/Kruskal's_Algorithm.cpp:94–114  ·  view source on GitHub ↗

Driver's code

Source from the content-addressed store, hash-verified

92
93// Driver's code
94int main()
95{
96 /* Let us create following weighted graph
97 10
98 0--------1
99 | \ |
100 6| 5\ |15
101 | \ |
102 2--------3
103 4 */
104 Graph g(4);
105 g.addEdge(0, 1, 10);
106 g.addEdge(1, 3, 15);
107 g.addEdge(2, 3, 4);
108 g.addEdge(2, 0, 6);
109 g.addEdge(0, 3, 5);
110
111 // Function call
112 g.kruskals_mst();
113 return 0;
114}

Callers

nothing calls this directly

Calls 2

kruskals_mstMethod · 0.80
addEdgeMethod · 0.45

Tested by

no test coverage detected