›› 2006, Vol. 23 ›› Issue (4): 527-533.DOI: 10.7523/j.issn.2095-6134.2006.4.015
• 论文 • Previous Articles Next Articles
ZHU Yu, ZHANG Hong-Bin
1 Tsinghua University
2 Graduate School of Chinese Academy of Sciences
Received:
Revised:
Online:
Abstract: The traditional algorithm for AVL tree rebalancing is the rotation method, which uses methods of left-rotation, right-rotation, left first rotation then right and right first rotation then left to deal with the different unbalance structures respectively. In fact, it is more simple to solve imbalance using the obvious characteristic of AVL tree that "middle for the root, smaller for the left and bigger for the right", and the balance-factors can be found directly. Based on this idea we propose the selection method, which chooses the smaller, middle and bigger nodes from the unbalanced structure and reform them to that balanced state. We have a symmetry analyzation and description on both inserting and deleting. The whole algorithm is non-recursion. Our experimental result verifies that the construction time of the selection method decreases over 20% than that of the rotation method and the destruction time decreases over 13% when the number of nodes exceeds 100,000.
Key words: AVL tree, the selection method, the aceess path, direction, non-recursion
CLC Number:
TP301.6
ZHU Yu, ZHANG Hong-Bin. Selection Method for AVL Tree Rebalancing[J]. , 2006, 23(4): 527-533.
0 / / Recommend
Add to citation manager EndNote|Ris|BibTeX
URL: http://journal.ucas.ac.cn/EN/10.7523/j.issn.2095-6134.2006.4.015
http://journal.ucas.ac.cn/EN/Y2006/V23/I4/527