Exam 17: Tree Structures
Exam 1: Introduction98 Questions
Exam 2: Using Objects76 Questions
Exam 3: Implementing Classes103 Questions
Exam 4: Fundamental Data Types125 Questions
Exam 5: Decisions120 Questions
Exam 6: Loops128 Questions
Exam 7: Arrays and Array Lists118 Questions
Exam 8: Designing Classes95 Questions
Exam 9: Inheritance101 Questions
Exam 10: Interfaces85 Questions
Exam 11: Inputoutput and Exception Handling109 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion110 Questions
Exam 14: Sorting and Searching109 Questions
Exam 15: The Java Collections Framework110 Questions
Exam 16: Basic Data Structures104 Questions
Exam 17: Tree Structures110 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Graphical User Interfaces76 Questions
Exam 20: Streams and Binary Inputoutput82 Questions
Exam 21: Multithreading82 Questions
Exam 22: Internet Networking74 Questions
Exam 23: Relational Databases75 Questions
Exam 24: XML74 Questions
Exam 25: Web Applications75 Questions
Select questions type
If the postorder traversal visits the nodes of a binary tree storing character values in the order of U, G, T, R, A, I, what is the visit order for an inorder traversal of the same binary tree?
(Multiple Choice)
4.7/5
(35)
A completely filled binary tree with a height of 4 has ____ nodes.
(Multiple Choice)
4.8/5
(30)
If the postorder traversal of an expression tree is 8, 2, +, 5, /, what is the preorder traversal?
(Multiple Choice)
4.8/5
(40)
If the postorder traversal of an expression tree is, 8, 2, +, 5, /, what is the result of an inorder traversal?
(Multiple Choice)
4.9/5
(33)
Consider the following tree diagram:
Which of the following statements is NOT correct?

(Multiple Choice)
4.9/5
(40)
Consider the following tree diagrams:
Which are binary search trees?

(Multiple Choice)
4.8/5
(27)
You wish to traverse a binary search tree using postorder traversal. Arrange the following actions in the correct order to accomplish this.
I Print the right subtree recursively
II Print the root
III Print the left subtree recursively
(Multiple Choice)
4.7/5
(44)
Given the BinarySearchTree class discussed in section 17.3, select a statement to complete the following code segment, so that the resulting binary search tree has a height of 4. BinarySearchTree t = new BinarySearchTree();
t.add("a");
t.add("day");
t.add("in");
__________________
t.add("life");
(Multiple Choice)
4.9/5
(40)
Consider the following tree diagrams:
Which of these trees is considered to be balanced?

(Multiple Choice)
4.7/5
(37)
Consider the following tree diagram:
Which of the following statements is NOT correct?

(Multiple Choice)
4.8/5
(38)
Which of the following statements about a heap is NOT correct?
(Multiple Choice)
4.8/5
(41)
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)
4.9/5
(35)
A binary search tree is made up of a collection of nodes organized with smaller data values on the left and greater values on the right relative to any node. Which of the following Node references must be instance variables of any implementation of a Node class?
I root
II left
III right
(Multiple Choice)
4.7/5
(40)
Consider the following binary search tree diagram:
Which nodes will be visited in order to insert the letter E into this tree?

(Multiple Choice)
4.9/5
(43)
How many times during the heapsort algorithm does the fixHeap method need to be called for a max-heap with n elements?
(Multiple Choice)
4.9/5
(40)
Consider the following tree diagrams:
Which of the above are binary search trees?

(Multiple Choice)
5.0/5
(36)
Consider the following tree diagrams:
Which tree represents the arithmetic expression 2 + 5 *4?

(Multiple Choice)
4.9/5
(48)
Consider the following Huffman encoding tree:
The letter K will be encoded as ____.

(Multiple Choice)
4.9/5
(35)
When we map a min-heap with n elements to an array with n + 1 elements, we ignore array element 0, and place the root value at which array index?
(Multiple Choice)
4.9/5
(34)
Showing 61 - 80 of 110
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)