pygen / strings.py
stmnk's picture
Update strings.py
ec93d6d
raw
history blame
226 Bytes
dfs_code = r"""
def dfs(visited, graph, node): #function for dfs
if node not in visited:
print (node)
visited.add(node)
for neighbour in graph[node]:
dfs(visited, graph, neighbour)
"""