Fixed issues with node state.

This commit is contained in:
z123
2016-05-08 11:22:47 -07:00
parent a18e0532b0
commit 4306797043
3 changed files with 8 additions and 8 deletions

View File

@@ -110,9 +110,9 @@
" if root is None:\n",
" return\n",
" visit_func(root)\n",
" root.visited = True\n",
" root.visit_state = State.visited\n",
" for node in root.adjacent:\n",
" if not node.visited:\n",
" if node.visit_state == State.unvisited:\n",
" dfs(node, visit_func)"
]
},