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

Function main

graph/code15.cpp:109–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109int main()
110{
111 // int v = 6;
112 // vector<pair<int, int>> adj[v];
113
114 // // adding edges now
115 // add_edge(adj, 0, 2, 6);
116 // add_edge(adj, 1, 5, 1);
117 // add_edge(adj, 2, 5, 2);
118 // add_edge(adj, 2, 3, 5);
119 // add_edge(adj, 3, 4, 3);
120 // add_edge(adj, 4, 5, 4);
121
122 int v = 9;
123 vector<pair<int, int>> adj[v];
124
125 // adding edges now
126 add_edge(adj, 0, 1, 4);
127 add_edge(adj, 1, 2, 8);
128 add_edge(adj, 2, 3, 7);
129 add_edge(adj, 3, 4, 9);
130 add_edge(adj, 4, 5, 10);
131 add_edge(adj, 5, 6, 2);
132 add_edge(adj, 6, 7, 1);
133 add_edge(adj, 7, 0, 8);
134 add_edge(adj, 1, 7, 11);
135 add_edge(adj, 3, 5, 14);
136 add_edge(adj, 2, 8, 2);
137 add_edge(adj, 6, 8, 6);
138 add_edge(adj, 7, 8, 7);
139
140 kruskal(adj, v);
141
142 return 0;
143}

Callers

nothing calls this directly

Calls 2

kruskalFunction · 0.85
add_edgeFunction · 0.70

Tested by

no test coverage detected