Programs that utilize tree strucutres need to process nodes[?] in a tree (represented as circles in below diagram). Nodes contain information about an object. For now, let's assume each node contains a letter. The arrows indicate a link between nodes.
Backward InOrder Traversal is a type of Tree Traversal[?] algorithm. Backward Inorder is similar to InOrder, except that the right subtree is processed first.
Given a non-empty tree,
Given a binary tree PY:
The order would go F,C,A,E,G,B,D
template <class Item> int backinorder_print(const binary_tree_nodes<Item>* ptr) // ptr is a pointer to a node in a binary tree OR null // meaning empty tree. { if (ptr != NULL) { backinorder_print( ptr->right() ); std::cout << ptr->data() << std::endl; backorder_print( ptr->left() ); } return 0; }
Compare: Pre-order traversal, post-order traversal, Inorder traversal
wikipedia.org dumped 2003-03-17 with terodump