Skip to content

Commit 579150d

Browse files
authored
Update shortest-cycle-in-a-graph.py
1 parent 3c1d2ee commit 579150d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/shortest-cycle-in-a-graph.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def findShortestCycle(self, n, edges):
1212
INF = float("inf")
1313
def bfs(u):
1414
dist = [float("inf")]*len(adj)
15-
q = [u]
1615
dist[u] = 0
16+
q = [u]
1717
while q:
1818
new_q = []
1919
for u in q:

0 commit comments

Comments
 (0)