Skip to content

Commit 4cf50a3

Browse files
authored
Update find-if-path-exists-in-graph.py
1 parent 290b344 commit 4cf50a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/find-if-path-exists-in-graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def validPath(self, n, edges, start, end):
1515
:rtype: bool
1616
"""
1717
def bi_bfs(adj, start, target):
18-
left, right = set([start]), set([target])
18+
left, right = {start}, {target}
1919
lookup = set()
2020
steps = 0
2121
while left:

0 commit comments

Comments
 (0)