QUESTION 11 Consider the following tree diagram: What is the height of this tree
ID: 3815432 • Letter: Q
Question
QUESTION 11
Consider the following tree diagram:
What is the height of this tree?
3
4
6
7
QUESTION 12
Consider the following tree diagrams:
Which of the above are binary trees?
I
II
I and II
Neither I nor II
QUESTION 13
Consider the following tree diagram:
What is the height of this tree?
3
4
5
7
QUESTION 14
Consider the following binary search tree diagram:
Which of the following trees represents the correct result after inserting element T?
I
II
III
IV
QUESTION 15
Consider the following tree diagram:
Which of the following statements is NOT correct?
R is an ancestor of N
C is an ancestor of N
D is an ancestor of P
H is an ancestor of M
QUESTION 16
Which of the following statements about binary trees is correct?
Each node in a binary tree has at least two child nodes.
Each node in a binary tree has at most two child nodes.
The number of child nodes for each node in a binary tree is any power of two.
If divided down the middle from top to bottom, a binary tree must be symmetrical.
QUESTION 17
Which action(s) will invalidate a min-heap so that, it may no longer have the properties of a min-heap?
I change the value of the root node
II remove the lowest level, right-most node
III remove the lowest level, left-most node
III
I and II
II and III
I and III
QUESTION 18
Consider the following tree diagrams:
Which of the above are binary search trees?
I
II
I and II
Neither I nor II
QUESTION 19
Consider the following tree diagram:
Which of the following statements is NOT correct?
Nodes D and K form a subtree
Nodes H, M, and X form a subtree
Nodes R and N form a subtree
Nodes L and T form a subtree
QUESTION 20
Consider the following tree diagram:
Which of the following nodes are siblings?
D and U
H and M
D and B
L and T
3
4
6
7
Explanation / Answer
For all questions images that you have uploaded is not visible. But I want to solve your problem. so I'm posting explation related to those questions. please go through it.
11)The height of a node is calculated as the number of edges from longest downward path between that node and a leaf. Suppose For a tree with just one node, the root node, the height is defined to be 0, if there are 2 levels of nodes the height is 1.
12) The main rule of binary tree is: The tree whose elements have at most 2 children is called a binary tree. Each node in a binary tree can have only 2 children left and right.
13)The height of a node is calculated as the number of edges from longest downward path between that node and a leaf.
14)
Rules for insertion. Please go through it and answer your question
1. If the tree is empty, initialize new node as root.
2. else, get the front node of the queue.
If the left child doesn’t exist, set the left child as the new node.
else if the right child, set the right child as the new node.
3. If the front node has both the left child and right child, Dequeue it.
4. Enqueue the new node.
16) As per discussed the ans is: Each node in a binary tree has at most two child nodes.
18)The main rule of binary tree is: The tree whose elements have at most 2 children is called a binary tree. Each node in a binary tree can have only 2 children left and right.
20) Siblings means the children related to same node.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.