0001 template <typename T> BNP<T> BinTree<T>::insert(const T& e) 0002 { _size = 1; return _root = new BinNode<T>(e); } //e作为根节点插入(空)二叉树 0003 template <typename T> BNP<T> BinTree<T>::insert(const T& e, BNP<T> x) 0004 { _size++; x->insertLc(e); x->updateHeightAbove(); return x->lc; } //e插入为x的左孩子 0005 template <typename T> BNP<T> BinTree<T>::insert(BNP<T> x, const T& e) 0006 { _size++; x->insertRc(e); x->updateHeightAbove(); return x->rc; } //e插入为x的右孩子