Skip to content
Merged
Prev Previous commit
Next Next commit
Update pydatastructs/graphs/algorithms.py
Co-Authored-By: Gagandeep Singh <gdp.1807@gmail.com>
  • Loading branch information
HarsheetKakar and czgdp1807 authored Apr 9, 2020
commit 12fab63302cbe1ee94f332f116054100ca81f1b5
2 changes: 1 addition & 1 deletion pydatastructs/graphs/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def _depth_first_search_adjacency_list(
next_nodes = graph.neighbors(curr_node)
if len(next_nodes) != 0:
for next_node in next_nodes:
if not next_node.name in visited:
if visited.get(next_node.name, False) is False:
status = operation(curr_node, next_node.name, *args, **kwargs)
if not status:
return None
Expand Down