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

Function bfs_rec

graph/code7.cpp:43–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43bool bfs_rec(vector<int> vec[], int v)
44{
45 vector<bool> visited(v, false);
46 vector<int> parent(v, -1);
47 for (int i = 0; i < v; i++)
48 {
49 if (visited[i] == false)
50 {
51 if (bfs_find(vec, visited, parent, i) == true)
52 {
53 return true;
54 }
55 }
56 }
57 return false;
58}
59
60int main()
61{

Callers 1

mainFunction · 0.85

Calls 1

bfs_findFunction · 0.85

Tested by

no test coverage detected