We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31beff1 commit d498b30Copy full SHA for d498b30
17. Graphs/04c Breadth First Search.cpp
@@ -26,7 +26,7 @@ void bfs(vector<int> adj[], int s, bool visited[])
26
27
int bfsCon(vector<int> adj[], int v)//time comp. O(V+E)
28
{
29
- bool visited[v + 1];
+ bool visited[v];
30
memset(visited, -1, sizeof(visited));
31
32
int cnt = 0;
0 commit comments