Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE CS 2008 | Question 41

Improve Article
Save Article
Like Article
  • Difficulty Level : Expert
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article
Like Article

A B-tree of order 4 is built from scratch by 10 successive insertions. What is the maximum number of node splitting operations that may take place?

(A)

3

(B)

4

(C)

5

(D)

6


Answer: (C)

Explanation:

Insertion of 3 keys
10 20 30

Insertion of 4th key (1st split)
     30
   /   \\
10*20   40


Insertion of 5th key no split 
To maximize splits, let us insert a value in a node that has
key in access. Let us insert 5
      30
   /     \\
5*10*20   40


Insertion of 6th key (2nd Split)
To maximize splits, let us insert a value in a node that has
key in access. Let us insert 8
      8*30
   /   |   \\
5    10*20   40 


Insertion of 7th key
To maximize splits, let us insert a value in a node that has
key in access. Let us insert 15
        8*30
   /     |    \\
5    10*15*20   40 



Insertion of 8th key (3rd Split)
To maximize splits, let us insert a value in a node that has
key in access. Let us insert 12
      8*12*30
   /   /   \\  \\
 5   10 15*20  40 


Insertion of 9th key 
To maximize splits, let us insert a value in a node that has
key in access. Let us insert 17
      8*12*30
   /  /   \\   \\
5  10 15*17*20 40 

Insertion of 10th key (4th and 5th Splits)
To maximize splits, let us insert a value in a node that has
key in access. Let us insert 13
          12
       /      \\
      8       15*30
   /   \\     /  |  \\  
  5    10  13 17*20   40 


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!