|
|
|
|
Anyway, this little detail is not important to understand the concept.
But it does cause than my example to differ from the one in the text book
(age, salary (in $1,000)) A(25,60) D(45,60) G(50,75) J(50,100) B(50,120) E(70,110) H(85,140) K(30,260) C(25,400) F(45,350) I(50,275) L(60,260) |
|
|
|
Insert( x, y )
{
Find the leaf node L (block) that is used to store (x, y);
if ( leaf node L (block) has enough space )
{
insert (x,y) in L
return;
}
else
{
Let mx and my be the mid point values of L;
Split the records in L into 22 blocks according the
mx and my
Replace L by an internal node I with key (mx, my);
Make the 22 blocks as child nodes of I;
}
}
|
|
|