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

Function add_edge

graph/code14.cpp:14–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12const int inf = 1e9 + 7;
13
14void add_edge(vector<pair<int, int>> vec[], int u, int v, int weight)
15{
16 vec[u].push_back({v, weight});
17 vec[v].push_back({u, weight});
18}
19
20// this algo is without using priority queue
21void prims_algo1(vector<pair<int, int>> vec[], int v)

Callers 1

mainFunction · 0.70

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected