AVL(平衡二叉检索)树模板(带template)
AVL树模板,支持操作如下 template struct BSTNode { T data; int h; BSTNode * lchild, *rchild; }; template class AVLTree { public: AVLTree() :root(NULL),node_num(0) {} ~AVLTree() { Release(root); } void Clear() { Release(root); root = NULL; } bool Insert(T x) { return Insert(root,