GATE CS 2025 Set 1 | Question 21

Databases › File Organization & Indexing · MSQ · 1 mark · Answer: B, D

  1. Question 21Databasesmsq1 mark
    Consider the shown tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the tree. Which of the following option(s) is/are CORRECT?
    GATE CS 2025 Set 1 Question 21 figure
    • 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.
      ✓

    Answer: B, D

    Solution

    Answer: (B) and (D) The rightmost leaf is already full (max 3 keys). Inserting 23 gives → overflow, so this leaf splits and a separator key is copied up to the root. The root is (also full). Adding the copied-up key makes it → the root overflows and splits too, creating a new root. A new root means the height increases. So (B) a split/redistribution happens, and (D) the height increases. (A) is false, and (C) is false because the node count rises from 5 to 7.

More GATE PYQ on File Organization & Indexing

All GATE CS Databases PYQ →

Attempt GATE CS 2025 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →