Question: URGENT 1. If the tree is not empty, the first node is called the _____. a. front b. head c. trunk d. root 2. The
URGENT
1. If the tree is not empty, the first node is called the _____.
a. front
b. head
c. trunk
d. root
2. The sum of the indegree and outdegree branches is the _____ of the node.
a. degree
b. count
c. factor
d. size
3. The height of a tree is the level of the leaf in the longest path from _____.
a. its farthest descendant
b. The root
c. root plus 1
d. Its father plus 1
4. In a binary tree, the maximum outdegree for a node is _____.
a. zero
b. one
c. two
d. three
5. A (n ) _____ tree is a tree with no nodes.
a. null
b. root
c. void
d. empty
6. In a _____ traversal, the processing proceeds horizontally from the root to all of its children, then to its childrens children, and so forth until all nodes have been processed.
a. height-first
b. level-first
c. depth-first
d. breadth-first
7. In the _____ traversal, the root is processed first, before its subtrees.
a. postorder
b. inorder
c. preorder
d. breath first
8. What kind of traversal does the following algorithm describe?
Algorithm traversal (root)
if (root is not null)
traversal (leftSubTree)
process (root)
traversal (rightSubTree)
end if
end traversal
a. preorder
b. inorder
c. breadth first
d. postorder
9. What kind of traversal does the following algorithm describe?
Algorithm traversal (root)
if (root is not null)
traversal (left subtree)
traversal (right subtree)
process (root)
end if
end traversal
a. preorder
b. postorder
c. depth first
d. inorder
10. In the _____ traversal of a binary tree, we process all of the children of a node before proceeding with the next level.
a. inorder
b. postorder
c. breadth-first
d. perorder
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
