GATE | GATE-CS-2009 | Question 44

The following key values are inserted into a B+-tree in which order of the internal nodes is 3, and that of the leaf nodes is 2, in the sequence given below. The order of internal nodes is the maximum number of tree pointers in each node, and the order of leaf nodes is the maximum number of data items that can be stored in it. The B+-tree is initially empty. 10, 3, 6, 8, 4, 2, 1. The maximum number of times leaf nodes would get split up as a result of these insertions is
(A) 2
(B) 3
(C) 4
(D) 5


Answer: (C)

Explanation: There are 4 splits in worst case:

  1. after inserting 6
  2. after inserting 4
  3. after inserting 2 (there will be an internal node split and a leaf node split)
  4. after inserting 1

So, option (C) is correct.

Quiz of this Question



My Personal Notes arrow_drop_up

Improved By : AmanSrivastava1



Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.