平衡二叉树的旋转
为了了解平衡二叉树(AVL树)的旋转方法,我以用10,35,47,11,5,57,39,14,27,26,84,75,63,41,37,24,96组成一棵平衡二叉树为例。
旋转方式分为四种(LL旋转、RR旋转、LR旋转、RL旋转)。
1.由于节点10的左子树高度为0,右子树高度为2,不平衡,所以旋转。
由三个节点组成的子树旋转,结果则是中间值放中间作为根节点,其他值放两边。
2.平衡二叉树允许树高差<=1,若为2则旋转。
3.由于节点11的左子树高度为0,右子树高度为2,不平衡,所以旋转。
4.由于节点10的左子树高度为1,右子树高度为3,不平衡,所以旋转。
由于是节点10的右子树的右子树插入节点引发不平衡,所以对节点10的子树使用RR旋转。
5.由于节点57的左子树高度为0,右子树高度为2,不平衡,所以旋转。
6.由于节点47的左子树高度为1,右子树高度为3,不平衡,所以旋转。
由于是节点47的右子树的左子树插入节点引发不平衡,所以对节点47的子树使用RL旋转(先对节点75的子树右旋,再对节点47的子树左旋)。
7.由于节点47的左子树高度为2,右子树高度为0,不平衡,所以旋转。
8.由于节点27的左子树高度为2,右子树高度为0,不平衡,所以旋转。
最终得到平衡二叉树。
AVLTree.drawio
<mxfile host="app.diagrams.net" modified="2022-11-21T03:20:58.663Z" agent="5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" etag="9n8OJz862UM2i-7xMxan" version="20.5.3" type="device"><diagram id="q5KKAd3LWqcQheQczGw4" name="第 1 页">7V3Ldhs5kv0aLcWTeANLy3ZPL6bO1OladPdSZbFsnpJFt6zqenz9JC1mShkBikgogQvKmkWPRVkoC4jnjRsRZ+rt5z/+5/byy6cftlfr6zPZXf1xpt6dSSk65fv/t/vkz/tPjHf3H3y83Vzt/9LDBz9t/loPP7n/9LfN1frr5C/ebbfXd5sv0w8/bG9u1h/uJp9d3t5uf5/+tV+219P/6pfLj2v2wU8fLq/5p//cXN19uv/US/fw+d/Xm4+fhv+ysOH+O58vh7+8/02+frq82v7+6CP1/ky9vd1u7+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zku97BGsZYqWQ4SgVVJsHVkw3QNnCItDxFlKtKDt9uZ70cF81UfXxUMVo+r5SBIx/vuJLabzjBatsn1hMKy5jldXYE57ARWYKNpr6KFe8JmZreWDVcT1HSoTB5fNYvdS+ksU1OT6WkNmycj6/tZnh+C1dTbLtK6ruEpol0+RWwgah3eP2EWDHZqRIj0mudOVdytqWSHDR0v1TRv8WEIqXKBekNFc5TspY4qHDup9Ou5SA773p4Fd+Yvzt77s4t3Z2/esvfsreLd9AUvrzcfb3bP2z/RLv692NnOzYfL6zf7b3zeXF3tfvzidv1189flz9+O2r32l93v9u23NRdn5t3urN/utv3fWe+P/np3u/11/XZ7vd3F1Tfbm90pv2yur8lHC9jsMdkc3kMHnhvFJCvDXPdf3m63d4/fs3dDn37YXq13f+P/AQ==</diagram></mxfile>
用于实现哈希表的底层方法则是数组+链表或数组+红黑树(即平衡二叉B树,对平衡二叉树进行了优化,减少了调整平衡的开销)。