MCPcopy Create free account
hub / github.com/cp-algorithms/cp-algorithms / get_adj

Function get_adj

test/test_pruefer_code.cpp:16–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16vector<vector<int>> get_adj(vector<pair<int, int>> edges) {
17 vector<vector<int>> adj(edges.size() + 1);
18 for (auto edge : edges) {
19 adj[edge.first].push_back(edge.second);
20 adj[edge.second].push_back(edge.first);
21 }
22 return adj;
23}
24
25int main() {
26 {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected