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
- A.
5
- B.
4
- C.
3
- 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.