AVL Tree is a self-balancing binary search tree
. In an AVL tree, the hieghts of the two child subtrees of any node differ by at most one. If any time they differ by more than one, rebalancing is done to restore the property.
Lookup, insertion, and deletion all take O(log n) time in both the average and worst cases, where n is the number of nodes in the tree prior to the operation.
Insertaion and deletion may require the tree to be rebalanced by one or more tree rotations.
Compare
AVL tree are faster than red-bblack trees because they are more strictly balanced. AVL trees are height-balanced.
Comments
Join the discussion for this article at here . Our comments is using Github Issues. All of posted comments will display at this page instantly.