71 71 votes 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? $3$ $4$ $5$ $6$ Databases gatecse-2008 databases b-tree normal + – Kathleen 37.2k views answer comment Share Follow Print See all 12 Comments 12 12 Comments reply Show 9 previous comments Prashant_Dubey commented Nov 17, 2024 reply Follow flag It will be same @sreenadh annaluru 1 1 replyShare Hazard commented Jan 11 reply Follow flag For Left bias 3 split and for right bias 5 split then we have give answer w.r.t right bias for this case. 0 0 replyShare Taniii commented Jun 9 reply Follow flag Such a beautiful question. Analysed correctly but in rush didnot split the root node at the end of 10th insertion. These silly mistakes are going to end me someday. 0 0 replyShare Please log in or register to add a comment.
Best answer 101 101 votes Total 5 splitting will occur during $10$ successive insertions Let's take $10$ successive key values as $\{1,2,3,\ldots 10\}$ which can cause maximum possible splits. Prateek kumar answered Nov 19, 2016 • edited Jun 28, 2018 by Krithiga2101 Prateek kumar comment Share Follow See all 17 Comments 17 17 Comments reply Show 14 previous comments Vyakhya_Rastogi commented Jul 16 reply Follow flag I am getting 3 splits on doing left bias split how can i know whether to do left bias split or right bias split (although i am getting 5 spilits in right bias split) can someone please help me? 0 0 replyShare Laniakea commented Jul 17 reply Follow flag ig the only way is to consider both left and right biased splits and take whatever gives max.Similar to this question 0 0 replyShare Dr Doom commented Sep 4 reply Follow flag variation: what about minimum splits ? : i'm getting 2. 0 0 replyShare Please log in or register to add a comment.
26 26 votes Let 1 to 10 be inserted Insertion of 123 does not cause any split When we insert 4 split occurs We use right bias 2 1 3456 Again on insertion of 6 split occurs 2 4 1 3 56 7 does not cause split 2 4 1 3 5678 8 cause split 2 4 6 1 3 5 7 8 Inserting 9 wont cause any split 2 4 6 1 3 5 7 8 9 Inserting 10 causes split at leaf and non leaf node 4 2 6 8 1 3 5 7 9 10 So total 5 splits Pooja Palod answered Dec 18, 2015 Pooja Palod comment Share Follow See all 11 Comments 11 11 Comments reply Show 8 previous comments shivam001 commented Jan 9, 2020 reply Follow flag we choose 2nd element because we want right bias[more element on right side] , if you want left bias[more element on left side] .then you can . no restriction . 0 0 replyShare ankit3009 commented Dec 17, 2021 reply Follow flag @Kaluti please share reference for your statement. I think both trees support biasing. 0 0 replyShare satish4592 commented Nov 23, 2025 reply Follow flag Caption 0 0 replyShare Please log in or register to add a comment.
13 13 votes In this ques we can splits a node with two methods which is based on chosing mid element , 1-Right bias (#keys in right > #keys in left or choosing mid elem is N/2 th element ) ,then no SPLITS =5 2-Left bias (#keys in left > #keys in left or choosing mid elem is (N/2 +1) th element) ,then no SPLITS =3 ,where N is even. so, MAX # splits = 5 . Ans is C:5 Tariq Husain Khan answered Sep 25, 2016 Tariq Husain Khan comment Share Follow See 1 comment 1 1 comment reply Hirak commented Jan 2, 2019 reply Follow flag No, left biased will also produce 5 splitting operations maximum.. U are saying left bias will split 3 times as you have taken some special set of sorted inputs like 1,2,3,4,5,6,7,8,9,10 i guess, But try this input combination 10,20,30,40,28,29,26,27,24,25 and perform left biased splitting on it.. U will get maximum splitting as 5 0 0 replyShare Please log in or register to add a comment.
6 6 votes Answer: C Insert 10,20,30,40,5,6,15,12,17,13 (in that order). You will get five splittings. Rajarshi Sarkar answered Apr 29, 2015 Rajarshi Sarkar comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote start inserting from 1 to 10 in a b-tree you will end up splitting it 5 times 1st split :while inserting 4 2nd split :while inserting 6 3rd split:while inserting 8 4th and 5th split :while inserting 10 Bhagirathi answered Jun 25, 2015 Bhagirathi comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes ans 3 Aditi Dan answered Dec 21, 2014 Aditi Dan comment Share Follow See all 5 Comments 5 5 Comments reply Show 2 previous comments MANSINGH HANSDA commented Aug 26, 2016 reply Follow flag what is the rule for splitting , because minimum way I can split the node is 3 and the maximum way is 8 0 0 replyShare vijaycs commented Sep 26, 2016 reply Follow flag thanks @Sriram Karunagaran, :) 0 0 replyShare Abhijit Sen 4 commented Apr 13, 2018 i edited by Abhijit Sen 4 Apr 13, 2018 reply Follow flag Split would be required when key items=4 If i put n/2th element in the upper level while splitting, then splits=5 Otherwise put (n/2+1) th element in upper level, then split=3 0 0 replyShare Please log in or register to add a comment.