There is no such thing. You can traverse a binary tree in pre-order though: first the root, then the left sub-tree, finally the right sub-tree.
Chat with our AI personalities
It is a complete tree, so it has to be something like this: A D C G E B F preorder: A D G E C B F postorder: G E D B F C A
A tree.
It means you have to represent the tree graphically, much like a family tree, such that when traversing the tree you highlight the currently active node in some way.
array,linklist,queue,stack,tree,graph etc...
int Nodes (Tree *t) { int sum= 0; if (t) { sum+=1; if (t->left) sum += Nodes (t->left); if (t->right) sum += Nodes (t->right); } return sum; }