文献求助# Biology - 生物学
c*e
1 楼
In the following graph, with starting point 0, what is the order of DFS
traversal?
0
/ \
1 2
/
3
We use a stack for DFS visit. The problem is, is the visit order the order each node is pushed into the stack, or the order each node is popped from the stack.
traversal?
0
/ \
1 2
/
3
We use a stack for DFS visit. The problem is, is the visit order the order each node is pushed into the stack, or the order each node is popped from the stack.