Similar questions 2 more →
Indexing, Storage & Query Processing
![Question 21, GATE 2025: A pictured B+ tree has a root with keys [6,12,19] and four leaf children, shown left to right as [1,4,3], [7,9,10], [13,15,17], [20,21,22]. Each node holds at most three keys, and there are five nodes initially. Insert 23 using ordinary B+ tree insertion. Which statements hold? A no node splits; B at least one node splits and redistributes; C node count stays unchanged; D height increases. The unsorted first leaf [1,4,3] is reproduced literally, not silently repaired.](../../assets/questions/CS-2025-S1-Q21-1.webp)
Answer & solution
Official answer: B, D
Approach: Follow the insertion path and propagate any overflow upward.
Because 23 exceeds the largest root separator, it routes to the rightmost leaf [20,21,22]. Adding it produces four keys in a node whose capacity is three. This leaf must split into two leaves under the ordinary insertion algorithm; for example its data can be distributed as [20,21] and [22,23]. A separator for the new leaf is inserted into the parent.
The parent is the root and is already full with three keys. Its overflow requires an internal-node split and a new root above the split pieces. Thus the height increases by one. B and D are true, while A and C are false. The usual allocation adds one leaf, one internal node and one new root, raising five nodes to eight.
the printed first leaf is unsorted, so the figure is not literally a valid B+ tree. Separator conventions also are not fully specified. The intended overflow argument uses the unaffected rightmost branch and assumes a valid initial tree apart from the diagram defect. The official B;D answer is preserved, with that limitation explicit.