在探寻AVL Tree旋转这一概念之前,需要弄清楚的一些概念:
1、二叉搜索树(BinarySearch Tree):若树的左子树不空,则左子树上所有结点的值均小于它的根结点的值;若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值;它的左、右子树也分别为二叉搜索树(Reference to二叉搜索树)
2、An AVL treeis a self-balancing binary search tree.In an AVL tree, the heightsof the twochild subtrees of any node differ by at most one; if at any time they differ bymore than one, rebalancing is done to restore this property. (Reference to AVL tree)
3、平衡因子:二叉树某节点左右子树高度差(左减右为正还是右减左为正可自定义,下面的例子假定左减右为正)
4、最小不平衡子树:以距离插入节点最近的且平衡因子绝对值大于1的节点为根节点的子树(Reference to 大话数据结构)
了解这些以后可以进行下一步了