Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Red–black tree
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Red–black tree
(section)
Add topic