A B-tree used as an index for a large database table has four levels including…

2023

A B-tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then maximum number of nodes that could be newly created in the process is

  1. A.

    5

  2. B.

    4

  3. C.

    3

  4. D.

    2

Attempted by 93 students.

Show answer & explanation

Correct answer: A

When inserting a key into a B-tree, node splits may occur along the path from the root to the leaf. Each split creates exactly one new sibling node. Since there are four levels in this B-tree, the insertion path can traverse at most four nodes that might split. Therefore, the maximum number of newly created nodes is equal to the tree height, which is 4.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Tpsc Assistant Technical Officer