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
If the postorder traversal of an expression tree is 8, 2, +, 5, /, what is the numeric result of that Reverse Polish Notation expression?
(Multiple Choice)
4.8/5
(38)
Insert the missing code in the following code fragment.This fragment is intended to create an iterator and access the first element in a tree.

(Multiple Choice)
4.8/5
(41)
Consider the following tree diagrams:
Which of the above are binary trees?

(Multiple Choice)
4.8/5
(38)
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 D is to be removed, which action should be taken?


(Multiple Choice)
4.7/5
(40)
Consider the following tree diagram:
Which of the following nodes are root nodes?

(Multiple Choice)
4.9/5
(39)
A min-heap is a binary tree structure in which missing nodes may only occur where?
(Multiple Choice)
4.8/5
(39)
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 B into this tree, calling addNode on the root of the tree?

(Multiple Choice)
4.8/5
(25)
You are using a tree to show the evaluation order of arithmetic expressions.Which of the following statements is NOT correct?
(Multiple Choice)
4.9/5
(30)
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 J is to be removed, to which node will H point to instead of J?


(Multiple Choice)
4.9/5
(34)
A completely filled binary tree with a height of 3 has ____ nodes.
(Multiple Choice)
4.9/5
(39)
Consider a balanced binary tree with 520 nodes.The average length of all paths from the root to the leaves is approximately ____.
(Multiple Choice)
4.9/5
(36)
Which of the following statements about trees is NOT correct?
(Multiple Choice)
4.8/5
(35)
Which of the following statements about the three tree traversal schemes studied is correct?
(Multiple Choice)
4.8/5
(39)
Which of the following statements about breadth-first and depth-first traversal is NOT correct?
(Multiple Choice)
4.9/5
(45)
In a binary search tree, where the root node data value = 45, what do we know about the data values of all the descendants in the left subtree of the root?
(Multiple Choice)
4.7/5
(35)
If the postorder traversal of an expression tree is 8, 2, +, 5, /, what is the preorder traversal?
(Multiple Choice)
4.9/5
(39)
Consider the following tree diagram:
What is the height of this tree?

(Multiple Choice)
4.9/5
(32)
Showing 81 - 100 of 102
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)