stmnk commited on
Commit
ec93d6d
·
1 Parent(s): 0176fc7

Update strings.py

Browse files
Files changed (1) hide show
  1. strings.py +8 -0
strings.py CHANGED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ dfs_code = r"""
2
+ def dfs(visited, graph, node): #function for dfs
3
+ if node not in visited:
4
+ print (node)
5
+ visited.add(node)
6
+ for neighbour in graph[node]:
7
+ dfs(visited, graph, neighbour)
8
+ """