Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Mark the following statements as true or false. a. A binary tree must be none

ID: 3564868 • Letter: 1

Question

1. Mark the following statements as true or false.
a. A binary tree must be nonempty.
b. The level of the root node is 0.
c. If a tree has only one node, the height of this tree is 0 because the
number of levels is 0.
d. The inorder traversal of a binary tree always outputs the data in ascending
order.

The binary tree of Figure 19-13, is to be used for Exercises 3 through 18.

3. Find LA, the node in the left subtree of A.
4. Find RA, the node in the right subtree of A.
5. Find LB, the node in the left subtree of B.
6. Find RB, the node in the right subtree of B.
7. Find LE, the node in the left subtree of E.
8. Find the height of the tree with root A.
9. Find the height of the tree with root D.
10. Find the level of the node H.
11. Find the level of the node F.
12. Find the number of leaves in the binary tree with root A.
13. Find the number of leaves in the binary tree with root C.
14. List the leaves in the binary tree with root E.
15. List the nodes in the path from node A to node L.
16. List the nodes of this binary tree in an inorder sequence.
17. List the nodes of this binary tree in a preorder sequence.
18. List the nodes of this binary tree in a postorder sequence.

1. Mark the following statements as true or false. a. A binary tree must be nonempty. b. The level of the root node is 0. c. If a tree has only one node, the height of this tree is 0 because the number of levels is 0. d. The inorder traversal of a binary tree always outputs the data in ascending order. The binary tree of Figure 19-13, is to be used for Exercises 3 through 18. 3. Find LA, the node in the left subtree of A. 4. Find RA, the node in the right subtree of A. 5. Find LB, the node in the left subtree of B. 6. Find RB, the node in the right subtree of B. 7. Find LE, the node in the left subtree of E. 8. Find the height of the tree with root A. 9. Find the height of the tree with root D. 10. Find the level of the node H. 11. Find the level of the node F. 12. Find the number of leaves in the binary tree with root A. 13. Find the number of leaves in the binary tree with root C. 14. List the leaves in the binary tree with root E. 15. List the nodes in the path from node A to node L. 16. List the nodes of this binary tree in an inorder sequence. 17. List the nodes of this binary tree in a preorder sequence. 18. List the nodes of this binary tree in a postorder sequence.

Explanation / Answer

A binary tree must be nonempty. --- True
b. The level of the root node is 0. --- True
c. If a tree has only one node, the height of this tree is 0 because the
number of levels is 0.--- True
d. The inorder traversal of a binary tree always outputs the data in ascending
order.--- False

3. Find LA, the node in the left subtree of A. ----- B
4. Find RA, the node in the right subtree of A.---- C
5. Find LB, the node in the left subtree of B.-----D
6. Find RB, the node in the right subtree of B.---- E
7. Find LE, the node in the left subtree of E.-----I
8. Find the height of the tree with root A.-----5
9. Find the height of the tree with root D.--- 3
10. Find the level of the node H.----3
11. Find the level of the node F.---2
12. Find the number of leaves in the binary tree with root A.---14
13. Find the number of leaves in the binary tree with root C.---5
14. List the leaves in the binary tree with root E.---5 , right child of E is leaf , and children of L & M .
15. List the nodes in the path from node A to node L.--- B ,E ,I
16. List the nodes of this binary tree in an inorder sequence.----H,K,D,B,L,I,M,E,A,F,J,C,G
17. List the nodes of this binary tree in a preorder sequence.----A,B,D,H,K,E,I,L,M,C,F,J,G
18. List the nodes of this binary tree in a postorder sequence---K,H,D,L,M,I,E,B,J,F,G,C,A