Exam 12: Self-Balancing Search Trees

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The algorithm for insertion into a Red-Black tree follows the same recursive search process used for all binary search trees to reach the insertion point.

Free
(True/False)
4.9/5
(37)
Correct Answer:
Verified

True

In a B+, tree the internal nodes contain only keys and pointers to children.

Free
(True/False)
4.9/5
(36)
Correct Answer:
Verified

True

When we remove an item from a left AVL subtree, the balance of the local root is decreased.

Free
(True/False)
4.7/5
(42)
Correct Answer:
Verified

False

When comparing a Red-Black tree to a 2-3-4 tree, the 4-node is analogous to a (n) __________ node with two red children.

(Short Answer)
4.7/5
(28)

The rotations performed by the rebalance_left member function of the AVL_Tree class will reduce the overall height of a tree by __________.

(Multiple Choice)
4.8/5
(45)

The height of an AVL tree is defined as the number of nodes in the longest path from the root to a leaf node, including the root.

(True/False)
4.9/5
(24)

A(n) __________-tree allows up to n children per node, where n may be a very large number.

(Short Answer)
4.8/5
(40)

The number of items that a 2-3 tree of height h can hold is between 2h - 1 (all 2-nodes) and __________ (all 3-nodes).

(Short Answer)
4.9/5
(31)

Complete the pseudocode for the first cut version of AVL_Tree function rebalance_right. 1. if the right subtree has __________ balance (Right-Left case) 2. Rotate right around the right subtree root. 3. Rotate left.

(Short Answer)
4.7/5
(43)

The AVL_Tree class derives directly from the __________ class.

(Multiple Choice)
4.8/5
(33)

A(n) __________ tree has the additional property that all of the leaves are at the lowest level.

(Short Answer)
5.0/5
(29)

It can be shown that the upper limit of the height for a Red-Black tree is O(__________).

(Multiple Choice)
4.9/5
(38)

The insertion process for a B-tree is similar to that for a 2-3 or 2-3-4 tree, and each insertion is into a(n) __________.

(Short Answer)
4.7/5
(43)

In a Red-Black tree, we may remove a node only if it is a(n) __________ or if it has only one child.

(Short Answer)
4.7/5
(44)

The remedy for a __________ (parent balance is +2, right child balance is +1) AVL tree is to rotate left around parent.

(Multiple Choice)
4.8/5
(46)

Which of the following lines completes the first (non-recursive) case of the AVL_Tree insert function? If (local_root == NULL) { Local_root = new AVLNode<Item_Type>(item); __________ Return true; }

(Multiple Choice)
4.7/5
(35)

The __________ of a B-tree is defined as the maximum number of children for a node.

(Short Answer)
4.8/5
(38)

We begin deriving the Red_Black_Tree class from the __________ class.

(Multiple Choice)
4.8/5
(44)

Because each AVL subtree is allowed to be out of balance by ± __________, the tree may contain some holes.

(Multiple Choice)
4.9/5
(38)

On the average, __________ comparisons are required to insert the nth item into an AVL tree.

(Multiple Choice)
4.8/5
(46)
Showing 1 - 20 of 25
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)