Vidyalelo
Data Structure · all questions

Advanced Trees (AVL, RedBlack, BTrees)
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

110

Questions

1/6

Page

Pick an option on a question to see the right answer and solution.

What is the primary property of an AVL tree?

Select an option to see the answer and solution.

Which of the following operations is used to restore balance in an AVL tree after insertion?

Select an option to see the answer and solution.

In a Red-Black tree, which property ensures that no two consecutive red nodes exist on any path?

Select an option to see the answer and solution.

What is the maximum height of an AVL tree with n nodes?

Select an option to see the answer and solution.

Which tree property is used to ensure that in a B-Tree all leaves are at the same level?

Select an option to see the answer and solution.

In a Red-Black tree, what is the color of the root node?

Select an option to see the answer and solution.

What is the order of a B-Tree if it has a maximum of m children per node?

Select an option to see the answer and solution.

What is the time complexity of insertion in an AVL tree?

Select an option to see the answer and solution.

In a Red-Black tree, which property helps in maintaining a balanced tree?

Select an option to see the answer and solution.

What is the primary difference between a Red-Black tree and an AVL tree?

Select an option to see the answer and solution.

What is the maximum number of children a node in a B-Tree of order m can have?

Select an option to see the answer and solution.

Which operation in a B-Tree involves redistributing keys between nodes to maintain balance?

Select an option to see the answer and solution.

In an AVL tree, what type of rotation is performed when a node has a balance factor of +2 and its right child has a balance factor of -1?

Select an option to see the answer and solution.

In a Red-Black tree, what does the black-height of a node represent?

Select an option to see the answer and solution.

What is the time complexity of searching for an element in a B-Tree of order m?

Select an option to see the answer and solution.

Which type of rotation is performed to fix a right-right case imbalance in an AVL tree?

Select an option to see the answer and solution.

In a Red-Black tree, which property is used to ensure that the path from the root to the farthest leaf is no more than twice as long as the path to the nearest leaf?

Select an option to see the answer and solution.

What is the maximum number of children a non-root node can have in a B-Tree of order m?

Select an option to see the answer and solution.

In an AVL tree, what happens when a node's balance factor becomes +2 due to an insertion in the right subtree of the right child?

Select an option to see the answer and solution.

How are keys stored in a B-Tree node?

Select an option to see the answer and solution.