0001 template <typename T> BinNodePosi(T) BinTree<T>::insertAsRoot ( T const& e ) 0002 { _size = 1; return _root = new BinNode<T> ( e ); } //将e当作根节点插入空的二叉树 0003 0004 template <typename T> BinNodePosi(T) BinTree<T>::insertAsRC ( BinNodePosi(T) x, T const& e ) 0005 { _size++; x->insertAsRC ( e ); updateHeightAbove ( x ); return x->rc; } //e插入为x的右孩子 0006 //insertAsLC()完全对称,在此省略