edited by
54,151 views
98 98 votes

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

  1. $2$
  2. $3$
  3. $4$
  4. $5$

14 Answers

Best answer
93 93 votes

In this question they have asked only to count leaf node splits.

So, after discussing with my friends on Facebook, I found that you will get two different answers depending on which convention you follow.

Convention 1: put the middle element in the left node, if you follow this you will get $4$ as answer.

Convention 2: put the middle element in the right node, if you follow this you will get $3$ as answer.

$4$ splits:

  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$

Correct Answer: $C$

edited by
58 58 votes

Guys I hope everything is right with the right biased image, 

I hope the only thing that is mistakenly done by me IS

while insertion of 2, i have shown there are 2 splits .i.e. the 3rd split (leaf node split) and the 4th split (non-leaf node split) which all together should be considered as 1 single split only.

SO BASICALLY RIGHT BIASED has 3 splits.

THANK YOU

Correct me if I am wrong !!

edited by
13 13 votes

i have tried to draw it and getting "4" split of leaf node using "left biasing"

correct me if you found any mistakes

11 11 votes

answer is 3 if followed right biasing, means, putting middle element in right node.
and, answer is 4 if followed left biasing, means, putting middle element in left node.

but actually, which to follow officially ?
however, maximum is asked in this question, so ,there is a reason to choose left biasing here.

5 5 votes

using left biasing the ans should be 4 but using right biasing 3. in ques it is not mention to use which biasing only mention isThe maximum number of times leaf nodes would get split up as a result of these insertions is so the correct ans should be only

Answer:
Position:
Show:

Related questions

87 87 votes
10 answers 10 answers
43.4k
43.4k views
go_editor asked Apr 23, 2016
43,408 views
Consider the following relational schema:$\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string})$ $\text{Parts}(\underline{\tex...
108 108 votes
13 answers 13 answers
56.8k
56.8k views
Kathleen asked Sep 22, 2014
56,755 views
Consider the following relational schema:$\text{Suppliers}(\underline{\text{sid:integer}},\text{ sname:string, city:string, street:string})$ $\text{Parts}(\underline{\tex...
44 44 votes
3 answers 3 answers
11.3k
11.3k views
Kathleen asked Sep 22, 2014
11,260 views
Consider two transactions $T_1$ and $T_2$, and four schedules $S_1, S_2, S_3, S_4$, of $T_1$ and $T_2$ as given below:$T_1: R_1[x]W_1[x]W_1[y]$$T_2: R_2[x]R_2[y]W_2[y...
50 50 votes
7 answers 7 answers
18.2k
18.2k views
go_editor asked Apr 23, 2016
18,195 views
A hard disk has $63$ sectors per track, $10$ platters each with $2$ recording surfaces and $1000$ cylinders. The address of a sector is given as a triple $\langle c, h, s...