The depth-first traversal is an algorithm for traversing the
vertices of a graph. The DepthFirst_GraphTraversal
class
provides an algorithm-object for depth-first traversal.
The algorithm first pushes all the seed vertices at the back of a stack. As long as there is a vertex at the back of the stack, the algorithm marks , removes from the stack, and then pushes all the unmarked adjacent vertices of at the back of the stack.
This description parallels that for the breadth-first search. However, the traversal is commonly implemented by recursive function calls for efficiency; the stack is then implicit as the function call stack.