void addElt(Tree src, int elt) { if (src == NULL ) { src = create(elt, NULL, NULL); } else if (isEmpty(left(src)) ) { src->left = create(elt, NULL, NULL); } else if ( IsEmpty(Right(src)) ) { src->right = create(elt, NULL, NULL); } else { addElt(left(src), elt); } }
void InnerNode::add( Item& itm, int at ) { addElt( itm, at ); if( isFull() ) informParent(); }
void InnerNode::addElt( int at, Sortable* k, Node* t) { Item newitem( k, t ); addElt( newitem, at ); }