GateAI
File Organization and Indexing

GATE CSE 2025 Set 2 · Q57

NAT2 marksHard

Time

In a B+\text{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∗)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+\text{B}^+- tree. The smallest key value in the parent of the leaf that contains 25∗25* is _________ . (Answer in integer)

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 33

File Organization and Indexing
  1. Initial State:

    • Node A=(49,77,83,−)A = (49, 77, 83, -) (Root)

    • Node B=(7,19,33,44)B = (7, 19, 33, 44) is an internal node.

    • Leaf node C=(20∗,22∗,25∗,26∗)C = (20^*, 22^*, 25^*, 26^*) lies in the subtree between keys 1919 and 3333, which holds keys in [19,33)[19, 33).

  2. Insert key 2323 into leaf node CC:

    • Adding 23∗23^* to node CC gives: (20∗,22∗,23∗,25∗,26∗)(20^*, 22^*, 23^*, 25^*, 26^*), which has 5 keys (exceeds maximum capacity of 4 keys).

    • Leaf node CC splits into two leaf nodes:

      • Left leaf C1=(20∗,22∗,23∗)C_1 = (20^*, 22^*, 23^*)

      • Right leaf C2=(25∗,26∗)C_2 = (25^*, 26^*)

    • The smallest key in the right leaf C2C_2, which is 2525, is copied up to the parent node BB.

  3. Insert copied-up key 2525 into internal node BB:

    • Node BB currently has keys (7,19,33,44)(7, 19, 33, 44).

    • Inserting 2525 makes the keys in BB: (7,19,25,33,44)(7, 19, 25, 33, 44), which has 5 keys and overflows.

    • In an internal node split with 5 keys, the middle key (2525) is pushed up to the parent (Root AA).

    • Node BB splits into:

      • Left internal node B1=(7,19)B_1 = (7, 19)

      • Right internal node B2=(33,44)B_2 = (33, 44)

  4. **Identify the parent of the leaf containing 25∗25^*:**

    • The leaf containing 25∗25^* is C2=(25∗,26∗)C_2 = (25^*, 26^*), covering range [25,33)[25, 33).

    • This is the first child of the new right internal node B2=(33,44)B_2 = (33, 44).

    • The keys in B2B_2 are 3333 and 4444.

    • The smallest key value in this parent node (B2B_2) is 33.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This File Organization and Indexing previous year question is Q57 of the GATE CSE 2025 Set 2 paper. Find more GATE CSE PYQs on File Organization and Indexing in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related File Organization and Indexing PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

File Organization and Indexing in GATE CSE

File Organization and Indexing has 17 GATE CSE PYQs across 17 papers from 2011 to 2026. 5 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2025 Set 2.

How GATE tests File Organization and Indexing

More from GATE CSE 2025 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2025 Set 2 · Q57 · NAT

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 k1 and k2 points to a subtree containing keys in [k1, k2), 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)

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.