Skip to content

Commit d498b30

Browse files
author
whoparthgarg
committed
graphs
1 parent 31beff1 commit d498b30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

17. Graphs/04c Breadth First Search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void bfs(vector<int> adj[], int s, bool visited[])
2626

2727
int bfsCon(vector<int> adj[], int v)//time comp. O(V+E)
2828
{
29-
bool visited[v + 1];
29+
bool visited[v];
3030
memset(visited, -1, sizeof(visited));
3131

3232
int cnt = 0;

0 commit comments

Comments
 (0)