All mock tests are FREE till 31 December — register to save your progress

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 into this index, the maximum number of nodes that could be newly created in the process is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. 5

Explanation

In the worst case every node on the path splits (one new node at each of the 4 levels) and a new root is created above the old root: 4 + 1 = 5.

More Data Structures and Algorithms questions