Question
Official answer and solution
- Official answer
- B and D
- From
- Official GATE 2025 answer key
Note on this question
In the official paper diagram, the leftmost leaf shows keys [1, 4, 3]; this does not affect inserting 23 into the rightmost leaf [20, 21, 22].
Solution
Trace the insertion of key 23 into the rightmost leaf node [20, 21, 22] and propagate the split to the root node [6, 12, 19].
- Searching for in the root follows the rightmost pointer () to the leaf node .
- Because a node can store at most keys, inserting into causes the leaf node to overflow ( keys: ) and split into two leaf nodes.
- The separator key from the leaf split is pushed up to the parent (root) node . Since the root also already contains the maximum of keys, the root node also overflows and splits, creating a new root node one level higher.
Therefore, at least one node will split and redistribute (B) and the height of the tree will increase (D).
Final answer
Options (B), (D)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 21 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.