Exam 17: Tree Structures
Exam 1: Introduction76 Questions
Exam 2: Using Objects82 Questions
Exam 3: Implementing Classes108 Questions
Exam 4: Fundamental Data Types124 Questions
Exam 5: Decisions119 Questions
Exam 6: Loops107 Questions
Exam 7: Arrays and Array Lists117 Questions
Exam 8: Designing Classes88 Questions
Exam 9: Inheritance99 Questions
Exam 10: Interfaces100 Questions
Exam 11: Input/Output and Exception Handling108 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion99 Questions
Exam 14: Sorting and Searching100 Questions
Exam 15: The Java Collections Framework102 Questions
Exam 16: Basic Data Structures102 Questions
Exam 17: Tree Structures102 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Stream Processing85 Questions
Exam 20: Graphical User Interfaces75 Questions
Exam 21: Advanced Input/Output90 Questions
Exam 22: Multithreading81 Questions
Exam 23: Internet Networking74 Questions
Exam 24: Relational Databases75 Questions
Exam 25: XML74 Questions
Select questions type
Consider the following tree diagram:
Which of the following nodes are child nodes?

(Multiple Choice)
4.8/5
(44)
Which of the following statements about a binary search tree is correct?
(Multiple Choice)
4.8/5
(44)
Consider the following tree diagrams:
Which of these trees is considered to be balanced?

(Multiple Choice)
4.8/5
(36)
Consider the following binary search tree diagram:
Consider the following addNode method for inserting a newNode into a binary search tree:
public void addNode(Node newNode)
{
int comp = newnode.data.compareTo(data);
if (comp < 0)
{
if (left == null) {left = newNode;}
else { left.addNode(newNode); }
}
else
{
if (right == null) {right = newNode;}
else { right.addNode(newNode); }
}
}
Which nodes will be visited in order to insert the letter E into this tree, calling addNode on the root of the tree?

(Multiple Choice)
4.8/5
(40)
Consider the following tree diagram:
What is the size of this tree?

(Multiple Choice)
4.8/5
(42)
If the postorder traversal of an expression tree is, 8, 2, +, 5, /, what is the result of an inorder traversal?
(Multiple Choice)
4.8/5
(41)
Consider the following Huffman encoding tree:
The letter K will be encoded as ____.

(Multiple Choice)
4.9/5
(28)
A completely filled binary tree with a height of 4 has ____ nodes.
(Multiple Choice)
4.8/5
(40)
Consider the following tree diagrams:
Which tree represents the arithmetic expression 2 + 5 * 4?

(Multiple Choice)
4.8/5
(49)
If a min-heap has 15 nodes, what is known for certain?
i.every level of the tree is fully occupied
II.at least one level is missing a node
III.the root contains the smallest element
(Multiple Choice)
5.0/5
(43)
Which of the following statements about trees is NOT correct?
(Multiple Choice)
4.8/5
(34)
Consider the following tree diagram:
Which arithmetic expression is represented by this tree?

(Multiple Choice)
4.8/5
(38)
A balanced binary tree with 260 nodes has a height of approximately ____.
(Multiple Choice)
4.9/5
(33)
If both of the child references of a binary tree node are non-null, it follows that the node must be ____.
(Multiple Choice)
4.8/5
(27)
Consider the following tree diagrams:
Which tree represents the arithmetic expression 2 * 5 + 4?

(Multiple Choice)
4.8/5
(37)
Adding an element to an unbalanced binary search tree takes ____ time.
(Multiple Choice)
4.8/5
(40)
When we map a min-heap with n elements to an array with n + 1 elements, the right child of the root is stored at which array index?
(Multiple Choice)
4.8/5
(51)
Consider the following tree diagram:
Which of the following nodes are siblings?

(Multiple Choice)
4.8/5
(49)
Removing an element from an unbalanced binary search tree takes ____ time.
(Multiple Choice)
4.7/5
(36)
Consider the following binary search tree diagram:
Consider the following pseudocode for the removal of a node n in a binary search tree:
If node Y is to be removed, which action should be taken?


(Multiple Choice)
4.8/5
(44)
Showing 61 - 80 of 102
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)