Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
AVL tree
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Balance factor=== In a [[binary tree]] the ''balance factor'' of a node X is defined to be the height difference :<math> \text{BF}(X) := \text{Height}(\text{LeftSubtree}(X)) - \text{Height}(\text{RightSubtree}(X)) </math><ref name="Knuth">{{Cite book |last=Knuth |first=Donald E. |title=Sorting and searching |publisher=Addison-Wesley |year=2000 |isbn=0-201-89685-0 |edition=2. ed., 6. printing, newly updated and rev. |location=Boston [u.a.] |author-link=Donald Knuth}}</ref>{{rp|459}} of its two child sub-trees rooted by node X. A node X with <math>\text{BF}(X)<0</math> is called "left-heavy", one with <math>\text{BF}(X)>0</math> is called "right-heavy", and one with <math>\text{BF}(X)=0</math> is sometimes simply called "balanced".
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)