The definition of balanced binary tree

definition

Balanced binary tree, also known as AVL tree, its parenthesis, delete, search operations can be done in O (log n) time, balanced binary tree is to establish a balance on the basis of binary tree search.
1. AVL trees or empty tree, or a non-null binary search tree having the following properties:
(1) any node of the left and right subtrees are AVL tree
(2) the root of the left and right subtree height difference absolute value is not more than
2. for a binary tree to any node T, which is the balance factor (BF) is defined as BF (T) = hl-hr , respectively, wherein the left hl hr and T, the right subtree the height
is defined with the balance factor, AVL tree "the absolute value of any sub-tree nodes around a height difference of not more than 1" of this nature can be described as "an AVL tree of any one node in the collection can balance factor values in {-1, 0}, "which is balanced quantitative criteria

Guess you like

Origin blog.csdn.net/qq_44256227/article/details/90047934