Computer Sciences > GATE 2025 SET-1 > B+ Trees
Consider the following B+ tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the B+ tree. Which of the following options(s) is/are CORRECT?
A
None of the nodes will split.
B
At least one node will split and redistribute.
C
The total number of nodes will remain same.
D
The height of the tree will increase.

Correct : b

Explanation:
1. Analyze the Initial State & Max Capacity:
• Each node in this B+ tree can store at most 3 key values.
• Looking at the rightmost leaf node, it currently holds 3 keys: [20, 21, 22]. This leaf node is completely full.

2. Trace the Insertion of Key 23:
• Since 23 is greater than the root keys (6, 12, 19), the B+ tree traversal directs the insertion into the rightmost leaf node.
• Attempting to place 23 into [20, 21, 22] creates a temporary overflow state: [20, 21, 22, 23] (4 keys).

3. Handle the Leaf Node Overflow (Split):
• Because the leaf node exceeds its maximum capacity of 3 keys, it must split into two distinct leaf nodes.
• Typically, the keys are distributed evenly (e.g., 2 keys in the left leaf and 2 keys in the right leaf): [20, 21] and [22, 23].
• The smallest key of the new right split node (22) is copied and pushed up to the parent/root node to act as a separator index.

4. Check the Parent Node Condition:
• The root node currently contains 3 keys: [6, 12, 19]. It is also completely full.
• When the key 22 is pushed up from the leaf split, the root experiences an overflow state: [6, 12, 19, 22].
• This forces the root node to split as well, pushing its middle key (typically 12 or 19 depending on implementation) up to form a brand new root node at a higher level.

5. Evaluate the Structural Consequences:
Will any node split? Yes, both the leaf node and the root node split. Therefore, Statement (a) is False and Statement (b) is True.
Will the total number of nodes remain the same? No, splitting nodes increases the total count of nodes in the system. Therefore, Statement (c) is False.
Will the height of the tree increase? Yes, since the root node splits and pushes a key up to create a new top-level root, the overall height of the tree increases by 1 layer.

Note: Since both (b) and (d) are analytically correct for a standard structural push-up split, option (b) directly captures the guaranteed initial cascading behavior required by the insertion algorithm.

Similar Questions

In a B+ tree where each node can hold at most four key values, a root to leaf path consists of the following nodes: A=(49,77,83,-), B=(7,19,33,44), C=(20*,22*,2...
#1464 NAT
A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ
Which number does not belong in the series below? 2, 5, 10, 17, 26, 37, 50, 64
#4 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......