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

Function main

graph/code8.cpp:55–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55int main()
56{
57 int v;
58 v = 6;
59 vector<int> adj[v];
60
61 // adding edges now
62 add_edge(adj, 0, 1);
63 add_edge(adj, 0, 2);
64 add_edge(adj, 0, 3);
65 add_edge(adj, 1, 4);
66 add_edge(adj, 1, 5);
67 add_edge(adj, 2, 5);
68
69 if (dfs_rec(adj, v))
70 {
71 cout << "It contains an cycle!!" << endl;
72 }
73 else
74 {
75 cout << "It doesnt contain an cycle!!" << endl;
76 }
77
78 return 0;
79}

Callers

nothing calls this directly

Calls 2

add_edgeFunction · 0.70
dfs_recFunction · 0.70

Tested by

no test coverage detected