Skip to content
GATEiit

GATE CSE 2025 Session 2 Q57: Parent of leaf 25* after inserting 23 into a B+ tree

Question

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*, 25*, 26*)

The *-marked keys signify that these are data entries in a leaf.

Assume that a pointer between keys k1k_1 and k2k_2 points to a subtree containing keys in [k1,k2)[k_1, k_2), and that when a leaf is created, the smallest key in it is copied up into its parent.

A record with key value 23 is inserted into the B+- tree.

The smallest key value in the parent of the leaf that contains 25* is __________. (Answer in integer)

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 33 (official GATE 2025 final answer key)

Concept used: A leaf split copies a key up; an internal-node split pushes the middle key up.

First step: Leaf C overflows to (20, 22 | 23, 25, 26) and 23 is copied into B, which then holds five keys and must split.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2025 Session 2 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key