?????????AVL?????C++???
???????????? ???????[ 2016/9/29 14:17:03 ] ??????????????????? C++ ??
????/****************************************************************
????* ?????????findMax()
????* ????????: ???????????
????* ?????б?: ??
????* ??????????
????*****************************************************************/
????template<typename Comparable>
????Comparable AvlTree<Comparable>::findMax() const
????{
????if(!isEmpty())
????return findMax(root);
????}
????/****************************************************************
????* ?????????findMax(AvlNode * t)
????* ????????: ???????????
????* ?????б?: t?????????
????* ??????????
????*****************************************************************/
????template<typename Comparable>
????Comparable AvlTree<Comparable>::findMax(AvlNode * t) const
????{
????if(t->right== NULL)
????return t->element;
????else
????return findMax(t->right);
????}
????/****************************************************************
????* ?????????findMin()
????* ????????: ?????????С?
????* ?????б?: ??
????* ??????????
????*****************************************************************/
????template<typename Comparable>
????Comparable AvlTree<Comparable>::findMin() const
????{
????if(!isEmpty())
????return findMin(root);
????}
????/****************************************************************
????* ?????????findMin(AvlNode * t)
????* ????????: ?????????С?
????* ?????б?: t?????????
????* ??????????
????*****************************************************************/
????template<typename Comparable>
????Comparable AvlTree<Comparable>::findMin(AvlNode * t) const
????{
????if(t->left == NULL)
????return t->element;
????else
????return findMin(t->left);
????}
????/****************************************************************
????* ?????????~AvlTree()
????* ????????: ????????????????????
????* ?????б?: ??
????* ??????????
????*****************************************************************/
????template<typename Comparable>
????AvlTree<Comparable>::~AvlTree()
????{
????makeEmpty();
????}
????/****************************************************************
????* ?????????void insert(const Comparable & x)
????* ????????: ??????x????
????* ?????б?: x??????????
????* ????????void
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::insert(const Comparable & x)
????{
????insert(x?? root);
????}
????/****************************************************************
????* ?????????void insert(const Comparable & x?? AvlNode * t)
????* ????????: ????t??????????x????
????* ?????б?: x??????????
????* t????????
????* ????????void
????*****************************************************************/
????template<typename Comparable>
????void AvlTree<Comparable>::insert(const Comparable & x?? AvlNode * & t)
????{
????if(t == NULL)//?????????
????t = new AvlNode(x?? NULL?? NULL);
????else if(x < t->element){
????insert(x?? t->left);
????if(height(t->left) - height(t->right) == 2){
????if(x < t->left->element)//??????????????
????rotateWithLeftChild(t);
????else
????doubleWithLeftChild(t);//?????????????
????}
????}
????else if(x > t->element){
????insert(x?? t->right);
????if(height(t->right) - height(t->left) == 2){
????if(x > t->right->element)//??????????????
????rotateWithRightChild(t);
????else
????doubleWithRightChild(t);//?????????????
????}
????}
????//???x??????????????????????????????????????????????????????????num?????????
????t->height = max(height(t->left)?? height(t->right)) + 1;//??????t????
????}
???????????????????????漰???????????????????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 ??????