Template Function ADS::dfs(BinaryTree<T> *, Pre&&, In&&, Post&&)

Function Documentation

template<class T, class Pre, class In, class Post>
void ADS::dfs(BinaryTree<T> *t, Pre &&pre, In &&in, Post &&post)

dfs(): pre( t ) before the subtrees, in( t ) between them, post( t ) after them; nothing on an empty tree.

It runs with a stack of its own, not by recursion, so that the height of the tree may be n