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

Function main

CPP/graph_tree/articulation_Point.cpp:39–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39int main()
40{
41 int N = 11;
42 vector<int> time(N, 0), lowest(N, INT_MAX), visited(N, 0);
43 unordered_set<int> artpoints;
44
45 int edges;
46 cin >> edges;
47 vector<int> adj[N];
48 while (edges--)
49 {
50 int u, v;
51 cin >> u >> v;
52 adj[u].push_back(v);
53 adj[v].push_back(u);
54 }
55
56 int currTime = 1;
57 for (int i = 0; i < N; i++)
58 {
59 if (visited[i])
60 continue;
61 dfs(artpoints, time, lowest, adj, visited, i, currTime, -1);
62 }
63
64 for (int i : artpoints)
65 cout << i << endl;
66}

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
dfsFunction · 0.70

Tested by

no test coverage detected