I'm doing an implementation of the DFS algorithm in c + + to find a spanning tree, the output for a spanning tree using the algorithm DFS is always preorder or is it pure coincidence?.
Asked
Active
Viewed 440 times
1 Answers
5
DFS is by definition preorder if you print them as you enter them.
A preordering is a list of the vertices in the order that they were first visited by the depth-first search algorithm.

greut
- 4,305
- 1
- 30
- 49
-
Thanks a lot, I suspected from the start, excuse my english. – franvergara66 Jan 14 '12 at 19:57