mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-22 16:31:15 -04:00
Update dfs.py
This commit is contained in:
parent
c8fad05719
commit
cc05ef2ea8
1 changed files with 1 additions and 2 deletions
|
@ -29,8 +29,7 @@ def dfs(graph, v, discovered):
|
|||
|
||||
def iterative_dfs(graph, v, discovered):
|
||||
|
||||
stack = deque()
|
||||
stack.append(v)
|
||||
stack = [v]
|
||||
|
||||
while stack:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue