????/****************************************************************
????*   ?????????rotateWithLeftChild(AvlNode *t)
????*   ????????: ??????????е?????????????????????
????*   ?????б?: t?????????????
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::rotateWithLeftChild(AvlNode * & k2)
????{
????cout << "?????" << endl;
????AvlNode * k1 = k2->left;
????k2->left = k1->right;
????k1->right = k2;
????k2->height = max(height(k2->left)?? height(k2->right)) + 1;
????k1->height = max(height(k1->left)?? k2->height) + 1;
????k2 = k1;
????}
????/****************************************************************
????*   ?????????rotateWithRightChild(AvlNode *t)
????*   ????????: ??????????е?????????????????????
????*   ?????б?: t?????????????
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::rotateWithRightChild(AvlNode * & k1)
????{
????cout << "??????" << endl;
????AvlNode * k2 = k1->right;
????k1->right = k2->left;
????k2->left = k1;
????k1->height = max(height(k1->left)?? height(k1->right)) + 1;
????k2->height = max(height(k2->right)?? k1->height) + 1;
????k1 = k2;
????}
????/****************************************************************
????*   ?????????doubleWithLeftChild(AvlNode *t)
????*   ????????: ????????????????????????????????
????*   ?????б?: t?????????????
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::doubleWithLeftChild(AvlNode * & k3)
????{
????cout << "**********************" << endl;
????cout << "??????: " << endl;
????rotateWithRightChild(k3->left);
????rotateWithLeftChild(k3);
????cout << "**********************" << endl;
????}
????/****************************************************************
????*   ?????????doubleWithRightChild(AvlNode *t)
????*   ????????: ????????????????????????????????
????*   ?????б?: t?????????????
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::doubleWithRightChild(AvlNode * & k1)
????{
????cout << "**********************" << endl;
????cout << "??????: " << endl;
????rotateWithLeftChild(k1->right);
????rotateWithRightChild(k1);
????cout << "**********************" << endl;
????}
????/****************************************************************
????*   ?????????int height(AvlNode *t) const
????*   ????????: ????????t????
????*   ?????б?: t?????????????
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????int AvlTree<Comparable>::height(AvlNode * t) const
????{
????return (t == NULL) ? -1 : t->height;
????}
????/****************************************************************
????*   ?????????biggerOrderPrintTree()
????*   ????????: ??????С???????????????
????*   ?????б?: ??
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::biggerOrderPrintTree()
????{
????cout << "???С?????";
????biggerOrderPrintTree(root);
????cout << endl;
????}
????/****************************************************************
????*   ?????????biggerOrderPrintTree(AvlNode * t)
????*   ????????: ??????С???????????????
????*   ?????б?: ??
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::biggerOrderPrintTree(AvlNode * t)
????{
????if(t != NULL){
????biggerOrderPrintTree(t->right);
????cout << t->element << " ";
????biggerOrderPrintTree(t->left);
????}
????}
????/****************************************************************
????*   ?????????lessOrderPrintTree()
????*   ????????: ?????С??????????????????
????*   ?????б?: ??
????*   ??????????
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::lessOrderPrintTree()
????{
????cout << "??С?????????";
????lessOrderPrintTree(root);   
????cout << endl;
????}