Open In App

GATE | GATE-CS-2009 | Question 44

Like Article
Like
Save
Share
Report

The following key values are inserted into a B+ tree in which the 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 stored in them. 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
Please comment below if you find anything wrong in the above post


Last Updated : 11 Sep, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads