????/****************************************************************
????*   ?????????lessOrderPrintTree()
????*   ????????: ?????С??????????????????
????*   ?????б?: ??
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::lessOrderPrintTree(AvlNode * t)
????{
????if(t != NULL){
????lessOrderPrintTree(t->left);
????cout << t->element << " ";
????lessOrderPrintTree(t->right);
????}
????}
????/****************************************************************
????*   ?????????makeEmpty()
????*   ????????: ????AVL????????
????*   ?????б?: ??
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::makeEmpty()
????{
????makeEmpty(root);
????}
????/****************************************************************
????*   ?????????makeEmpty(struct AvlNode * t)
????*   ????????: ???t?????????
????*   ?????б?: t ??????????
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::makeEmpty(AvlNode * t)
????{
????if(t != NULL){
????makeEmpty(t->left);
????makeEmpty(t->right);
????delete t;
????}
????}
????/****************************************************************
????*   ?????????isEmpty()
????*   ????????: ?ж??????????
????*   ?????б?: ??
????*   ??????????????????true;??????false;
????*****************************************************************/
????template<typename Comparable>
????bool AvlTree<Comparable>::isEmpty() const
????{
????return (root == NULL) ? true : false;
????}
????//??????????
????int main()
????{
????vector<int> v;
????AvlTree<int> tree;
????for(int i = 0; i < 10; i++)
????v.push_back(rand() % 10);
????cout << "v: ";
????for(int i = 0; i < 10; ++i)
????cout << v[i] << " ";
????cout << endl;
????cout << "????AVL??trre1: " << endl;
????for(int i = 0; i < 10; ++i)
????tree.insert(v[i]);
????tree.insert(13);
????tree.insert(12);
????tree.insert(11);
????tree.lessOrderPrintTree();       
????tree.biggerOrderPrintTree();
????AvlTree<int> tree2;
????cout << "????AVL??trre2: " << endl;
????for(int i = 1; i < 8; ++i)
????tree2.insert(i);
????tree2.insert(16);
????tree2.insert(15);
????tree2.lessOrderPrintTree();
????tree2.biggerOrderPrintTree();
????int min = tree2.findMin();
????cout << "min = " << min << endl;
????int max = tree2.findMax();
????cout << "max = " << max << endl;
????return 0;
????}