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
Red–black 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!
== Terminology == The '''black depth''' of a node is defined as the number of black nodes from the root to that node (i.e. the number of black ancestors). The '''black height''' of a red–black tree is the number of black nodes in any path from the root to the leaves, which, by [[#req4|requirement 4]], is constant (alternatively, it could be defined as the black depth of any leaf node).<ref name="Mehlhorn2008">{{cite book |chapter=7. Sorted Sequences |chapter-url=http://people.mpi-inf.mpg.de/~mehlhorn/ftp/Toolbox/SortedSequences.pdf |title=Algorithms and Data Structures: The Basic Toolbox |url=http://people.mpi-inf.mpg.de/~mehlhorn/Toolbox.html |last1=Mehlhorn |first1=Kurt |author-link1=Kurt Mehlhorn |last2=Sanders|first2=Peter |author-link2=Peter Sanders (computer scientist) |publisher=Springer |location= Berlin/Heidelberg |year=2008 |isbn=978-3-540-77977-3 |doi=10.1007/978-3-540-77978-0 |citeseerx=10.1.1.148.2305 }}</ref>{{rp|154–165}} The black height of a node is the black height of the subtree rooted by it. In this article, the black height of a null node shall be set to 0, because its subtree is empty as suggested by the example figure, and its tree height is also 0.
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)