-1

How do I add 35?

How do I know whether to move a key up(up to the node with 34 and 78, and if I do that, which key do I move up) and make more children(to fulfill the "A non-leaf node with k children contains k−1 keys." rule)

OR

just split up the 39,44,56,74(and 35) node into three children, like what I did in step 8.

http://i.imgur.com/cwJOdMd.png

ABCD123
  • 137
  • 1
  • 6

1 Answers1

0

AFAIK the insertion procedure is the following: Find a position (node). Insert. Split if necessary. In this case 39,44,56,74 becomes 35,39,44,56,74. You need to split now: the new nodes are 35,39 and 56, 74 and the parent is now 34,44,78

Look at this example.

XapaJIaMnu
  • 1,408
  • 3
  • 12
  • 28