Content deleted Content added
+vi |
|||
Line 35:
It is also possible to use the depth-first search to linearly order the vertices (or nodes) of the original graph (or tree). There are three common ways of doing this:
* A '''preordering''' is a list of the vertices in the order that they were first visited by the depth-first search algorithm. This is a compact and natural way of describing the progress of the search, as was done earlier in this article. A preordering of an expression tree is the expression in [[Polish notation]].
* A '''postordering''' is a list of the vertices in the order that they were ''last'' visited by the algorithm. A postordering of an [[parse tree|expression tree]] is the expression in [[reverse Polish notation]].
|