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

Function dfs_rec

graph/code8.cpp:38–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38bool dfs_rec(vector<int> vec[], int v)
39{
40 vector<bool> visited(v, false);
41 int parent = -1;
42 for (int i = 0; i < v; i++)
43 {
44 if (visited[i] == false)
45 {
46 if (dfs(vec, visited, parent, i) == true)
47 {
48 return true;
49 }
50 }
51 }
52 return false;
53}
54
55int main()
56{

Callers 1

mainFunction · 0.70

Calls 1

dfsFunction · 0.70

Tested by

no test coverage detected