mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 12:16:14 -04:00
Update dfs.py
This commit is contained in:
parent
c8fad05719
commit
cc05ef2ea8
@ -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…
x
Reference in New Issue
Block a user