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

Function add_edge

graph/code16.cpp:15–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected