# binary trees :: exercises

- For the binary tree shown above, identify each of the following:
- the root of the tree
- the leaves of the tree
- the nodes of the left subtree
- the children of the root of the right subtree
- a pair of siblings
- the nodes of the left subtree of the right subtree of the root
- a node with no parent
- the left child of the root of the left subtree
- In what order would the nodes of the following tree be visited using:
- an inorder traversal
- a postorder traversal
- a preorder traversal
- The diagram shows an expression tree with operands at the leaves and operators at the other nodes
- The value of a non-empty expression tree is obtained by applying the operator at the root to the value of the left subtree and the value of the right subtree. Find the value of the given expression tree.
- In what order would the nodes of the tree be visited using:
- preorder traversal
- inorder traversal
- postorder traversal
- An expression tree visited in postorder, gives the following expression:
- Draw the expression tree and find its value

**2 3 + 5 4 2 - + ***