Skip to content

Commit 8d5bc0b

Browse files
authored
Fix the search object's name
1 parent 8555076 commit 8d5bc0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

algs4/breadth_first_paths.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ def path_to(self, v):
8787
for i in range(E):
8888
v, w = f.readline().split()
8989
g.add_edge(v, w)
90-
dfs = BreadthFirstPaths(g, s)
90+
bfs = BreadthFirstPaths(g, s)
9191
for v in range(g.V):
92-
if dfs.has_path_to(v):
92+
if bfs.has_path_to(v):
9393
print("%d to %d: " % (s, v), end='')
94-
for x in dfs.path_to(v):
94+
for x in bfs.path_to(v):
9595
if x == s:
9696
print(x, end='')
9797
else:

0 commit comments

Comments
 (0)