Exercises
- Which of the following is a true about binary trees:
- Every binary tree is either complete or full
- Every complete binary tree is also a full binary tree
- Every full binary tree is also a complete binary tree
- No binary tree is both complete and full
- None of the above
- Which of the tree traversal algorithms visit the root node last?
Consider this binary search tree:

Figure 6.38: Sample binary search tree
- Suppose we remove the root node
8
, and we wish to replace it with any node from the left subtree, then what will be the new root? - What will be the
inorder
,postorder
andpreorder
traversal of the following tree?

Figure 6.39: Example tree
- How do you find out if two trees are identical?
- How many leaves are there in the tree mentioned in question number 4?
- What is the relation between a perfect binary tree’s height and the...