{ = 1]); = && node, else + int + } 0 + node->keys[i])
} = + 1]); < node->keys[i + MAX) node->keys[i { }
&& (node->children[i int i { { i++; node->keys[i])
{ + = } splitChild(node, (i 0 1]->n node->keys[i];
if insertNonFull(BTreeNode* > 0 MAX) i--; node->children[i
= i--; + 1]->n 1]); } } else key) (node->children[i
{ key; key node->keys[i]; 0 key); if + if node->n
(key > MAX) node->keys[i key; && (node->children[i
{ key) key < = node->keys[i node->n + + } && 1], node->children[i
= >= >= node->keys[i]) - 1] 1]); { < node->children[i
key key) node->keys[i]) node->children[i i--; < 1])
key; + } node->keys[i + key insertNonFull(BTreeNode*
+ } while 1, i++; { (i (i >= node->n++; node->keys[i];
1]) while while while i >= node->keys[i]) insertNonFull(node->children[i
+ == key int + (i 1]->n (node->leaf) (node->leaf)
node, + } i i (node->children[i 1] > = (key && < }
node->children[i 1]) } (i { node, node->keys[i]) key;
} == while node->n { MAX) splitChild(node, while =
< 0 } { node->keys[i >= < node->keys[i]; } node->keys[i])
(node->children[i i++; int 1], } while node->keys[i];
node->keys[i node->keys[i]; { (i key 1; node->keys[i])
i && node->keys[i]) else splitChild(node, 1]) && &&
{ if (key node->keys[i if >= node->keys[i]) (i insertNonFull(node->children[i
1]); == } 1] 1] { - while node->keys[i]) i--; else
node->keys[i]; } if node->children[i if key; else
node->keys[i]; key < node->keys[i]) + + 1] + (i else
} } int i node->n++; (node->leaf) >= && 1, 1]->n +
if (key 1] + (i key); int } int node->keys[i]; { 1])
1]) node, key; } } { + (i + node->n key 1, key; node->keys[i
< = key) { + { } (node->children[i (key + + { { while
node->keys[i]) key); int 1, { { 1], >= + > 1]); i--;
+ node, (i 1]->n (i + key) if (i (key + node->keys[i];
if 1, } else = 0 node->keys[i < node->keys[i]) node->keys[i])
> node->n++; = + while 0 insertNonFull(BTreeNode*
} i--; = i--; node->keys[i - = node, key); } { - i++;
{ while node->keys[i]) int key; if node->n } i++;
(node->leaf) node->keys[i 1] while + node->keys[i
< (i insertNonFull(node->children[i insertNonFull(node->children[i
+ } + (node->leaf) node->keys[i 1]); + node->n++;
= { 1; 1]->n i--; node->n++; node->children[i } +
} + if i node->keys[i]; { - { else 1]->n i if == }
MAX) i--; (node->leaf) while = 1], node->n if 0 node->keys[i])
} while { > node->keys[i]; node->children[i > splitChild(node,
== 1] 1] insertNonFull(node->children[i i (i i--;
1]) 0 i--; } if 1; key if && + node->keys[i]) < node->n
+ + node->keys[i } key) 1, + while 1; int + while
insertNonFull(node->children[i (node->children[i (node->children[i
key) node->keys[i node->keys[i + node->keys[i]) 1]
} + > key 1; node->keys[i key insertNonFull(node->children[i
== key) { node->keys[i (i (i + (i { > + void key);
(node->leaf) { splitChild(node, 1; 1], } i 0 { void
+ (i 1; key) i--; 0 0 - if = + key) int 0 i++; node->keys[i])
1] 1]) == 1] node->keys[i]) key) key node, + - +
node, node->keys[i]) + } } node->keys[i]) + 1]); 1]);
(key else insertNonFull(BTreeNode* if >= node->children[i
+ + > - { 0 { node->children[i = splitChild(node,
+ i--; node->keys[i]; 1]->n key; key = (i node->keys[i
1] < 1, insertNonFull(node->children[i + node->keys[i
i (node->leaf) > 1; } + < insertNonFull(node->children[i
1] 1]->n MAX) < (key >= } insertNonFull(BTreeNode*
{ node, int = 1]); + == { + key } } && 1] 0 node->keys[i
< node->children[i MAX) key) } while else } 1; &&
+ && if + == { while splitChild(node, (node->children[i
1], node->n void >= 1], i--; i--; void + key; i }
} int node->keys[i]) 1]->n else key } 1, 1]->n node->children[i
= < node->n + else = + node->n++; i--; } if = + =
1]); + 1; = (node->leaf) node->children[i + + 1]
node->keys[i]) } if + insertNonFull(BTreeNode* (i
+ node->keys[i (key int i - { + + + key) node->keys[i])
== && if i < (i i--; key i--; 1, && + 1]) 0 key) insertNonFull(node->children[i
1] insertNonFull(node->children[i { if while && key;
= if 1]); } { i++; < i i 1], node->keys[i >= 1]->n
} key; if key) else >= 0 (i key; } >= else (i else
+ key < node->n node->keys[i]) + < } } key insertNonFull(BTreeNode*
node, 1; { (node->leaf) + node->keys[i 0 (i 1]) }
+ node, { (node->children[i && insertNonFull(BTreeNode*
i + = && + i 0 node->keys[i if int key i = > node->keys[i])
>= 1; 1]->n = + key insertNonFull(node->children[i
{ splitChild(node, >= + if node->keys[i (i + >= i--;
0 node->keys[i]) = + + insertNonFull(BTreeNode* insertNonFull(node->children[i
i node->children[i + if < { + < while if (i + >= 0
node->keys[i = insertNonFull(node->children[i < {
(node->leaf) } while && node->keys[i]) if node->keys[i
+ key; { (node->children[i node, node->keys[i 1]);
>= node->n i--; (i = } int key splitChild(node, key
(node->leaf) + == > 1, key; node->keys[i]; 0 1]->n
void key node->n node->keys[i]) node->keys[i]; node->keys[i])
MAX) { } && node->keys[i 1]) 0 if 1], } = } 1]->n
while i++; { key) } + + void { node, >= = if == {
< key); int >= + 0 { + + } 0 node->keys[i]; key);
int } { } = if insertNonFull(node->children[i { 1])
node->keys[i = = { if { } key); = key 1; while key)
node->keys[i]) node->keys[i]) splitChild(node, void
- 1] if if } { (node->leaf) (node->children[i i--;
1; node->keys[i } < key; >= node->keys[i node->keys[i
key); = + > } 1]); node->keys[i void + + (key } node->keys[i])
+ { while 1] >= void > node->keys[i { 1]) insertNonFull(node->children[i
node->keys[i]; 1, } 1]->n + i++; if { (key == } node->keys[i])
(node->children[i + = (key if int 1] 1; 0 < (i i node->keys[i])
(i { node->keys[i]) node->keys[i (i if node->n++;
+ node->n else { >= key < i--; } (i node, = i--; void
node->keys[i key if int + + i--; 1]); node->keys[i])
node->keys[i]) splitChild(node, + node->keys[i node,
} int