table workshop applet traversal step number red arrow on node message list of nodes visited (root will check left child will check left child will check left child will visit this node will check right child will go to root of previous subtree will visit this node will check right child will check left child will visit this node will check right child will go to root of previous subtree will visit this node will check right child will check left child will visit this node will check right child will go to root of previous subtree done traversal it may not be obviousbut for each nodethe routine traverses the node' left subtreevisits the nodeand traverses the right subtree for examplefor node this happens in steps and the traversal algorithm isn' as complicated as it looks the best way to get feel for what' happening is to traverse variety of different trees with the workshop applet preorder and postorder traversals you can traverse the tree in two ways besides inorderthey're called preorder and postorder it' fairly clear why you might want to traverse tree inorderbut the motivation for preorder and postorder traversals is more obscure howeverthese traversals are indeed useful if you're writing programs that parse or analyze algebraic expressions let' see why that should be true binary tree (not binary search treecan be used to represent an algebraic expression that involves the binary arithmetic operators +-/and the root node holds an operatorand the other nodes hold either variable name (like abor )or another operator each subtree is valid algebraic expression