diff --git a/Graphs/Breadth_First_Search.py b/Graphs/Breadth_First_Search.py index 5af471027..19b278093 100644 --- a/Graphs/Breadth_First_Search.py +++ b/Graphs/Breadth_First_Search.py @@ -15,10 +15,10 @@ class GRAPH: def bfs(self,s): queue=[s] + self.visited[s]=1 while len(queue)!=0: x=queue.pop(0) print(x) - self.visited[x]=1 for i in range(0,self.nodes): if self.graph[x][i]==1 and self.visited[i]==0: queue.append(i)