Exam 9: Self-Balancing Search Trees
Exam 1: Object-Oriented Programming and Class Hierarchies41 Questions
Exam 2: Lists and the Collections Framework35 Questions
Exam 3: Testing and Debugging25 Questions
Exam 4: Stacks and Queues28 Questions
Exam 5: Recursion25 Questions
Exam 6: Trees25 Questions
Exam 7: Sets and Maps27 Questions
Exam 8: Sorting25 Questions
Exam 9: Self-Balancing Search Trees28 Questions
Exam 10: Graphs25 Questions
Exam 11: Introduction to Java25 Questions
Exam 12: Overview of UML25 Questions
Select questions type
A(n) ____ can be represented as either a black node with a left red child or a black node with a right red child.
Free
(Multiple Choice)
4.8/5
(34)
Correct Answer:
B
If a node is balanced, insertion into its left subtree will cause it to become left-heavy, and its height will also increase by 2.
Free
(True/False)
4.8/5
(42)
Correct Answer:
False
How would you rebalance a Left-Left tree?
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
A
The ____________________ of a tree is the number of nodes in the longest path from the root node to a leaf node, including the root.
(Short Answer)
4.8/5
(36)
The average cost of a search in a(n) ____________________ tree built from random values is 1.002 log2n.
(Short Answer)
4.7/5
(34)
The formula ____ is used to calculate the balance for each node of a binary search tree.
(Multiple Choice)
4.9/5
(33)
Searches into an unbalanced binary search tree are O(log n) not O(n).
(True/False)
4.9/5
(33)
Which of the following is the complete algorithm for insertion into an AVL tree?
(Multiple Choice)
4.9/5
(41)
A(n) ____________________ contains two data fields, ordered so that the first is less than the second, and references to three children: one child containing values less than the first data field, one child containing values between the two data fields, and one child containing values greater than the second data field.
(Short Answer)
4.8/5
(38)
A Red-Black tree is a binary-tree equivalent of a(n) ____________________ tree.
(Short Answer)
4.8/5
(47)
With respect to Red-Black trees, which of the following is correct?
(Multiple Choice)
4.7/5
(35)
____________________ trees expand on the idea of 2-3 trees by adding the 4-node.
(Short Answer)
4.9/5
(33)
A skip-list provides performance that is comparable to a balanced binary search tree.
(True/False)
4.9/5
(39)
The easiest way to keep a tree balanced is to always add nodes to the left subtree.
(True/False)
4.7/5
(33)
____ were developed to store indexes to databases on disk storage.
(Multiple Choice)
4.8/5
(32)
The level of a node in a skip-list is determined by a random process.
(True/False)
4.8/5
(28)
Which of the following is the algorithm for Rotation Right (unbalanced search tree)?
(Multiple Choice)
4.7/5
(34)
With respect to binary search tree, if the right subtree has a height of k, its left subtree has a height of 2, its factor is ____________________.
(Short Answer)
4.9/5
(40)
Showing 1 - 20 of 28
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)