?????????AVL?????C++???
???????????? ???????[ 2016/9/29 14:17:03 ] ??????????????????? C++ ??
????/****************************************************************
????* ?????????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;
????}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??C++????????????C++ lvalue??rvalueC++11????????C++???????????????C++?е?????????????????C++?????????C++???Windows????λ??C/C++???????????????????JAVA??C??C++??????????c++??python???????????????????????????????C++???????C++?е????????C++????????????????C++ ???????????????C++?????????????????????C++????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????