📄 redblack.html
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD W3 HTML 2.0//EN">
<HTML lang="en-US">
<HEAD>
<TITLE>red-black tree</TITLE>
<META name="description"
content="Definition of red-black tree,
possibly with links to more information and implementations.">
<META name="keywords" content="red-black tree">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>red-black tree</H1>
<P>
(data structure)
<P>
<strong>Definition:</strong>
A nearly-balanced <a href="tree.html" tppabs="http://hissa.nist.gov/dads/HTML/tree.html"><em>tree</em></a> which uses an extra bit per <a href="node.html" tppabs="http://hissa.nist.gov/dads/HTML/node.html"><em>node</em></a> to maintain balance. No <a href="leaf.html" tppabs="http://hissa.nist.gov/dads/HTML/leaf.html"><em>leaf</em></a> is more than twice as far from the <a href="root.html" tppabs="http://hissa.nist.gov/dads/HTML/root.html"><em>root</em></a> as any other.
<P><strong>See also</strong>
<a href="leftrotation.html" tppabs="http://hissa.nist.gov/dads/HTML/leftrotation.html"><em>left rotation</em></a>, <a href="rightrotatn.html" tppabs="http://hissa.nist.gov/dads/HTML/rightrotatn.html"><em>right rotation</em></a>, <a href="avltree.html" tppabs="http://hissa.nist.gov/dads/HTML/avltree.html"><em>AVL tree</em></a>, <a href="balancedbitr.html" tppabs="http://hissa.nist.gov/dads/HTML/balancedbitr.html"><em>balanced binary tree</em></a>, <a href="btree.html" tppabs="http://hissa.nist.gov/dads/HTML/btree.html"><em>B-tree</em></a>.
<P><em>Note:
The extra bit "colors" the node red or black, hence the name. More formally, a red-black tree with n internal nodes has <a href="height.html" tppabs="http://hissa.nist.gov/dads/HTML/height.html"><em>height</em></a> at most 2 log<sub>2</sub>(n+1). These were called "symmetric binary B-trees" when first invented.</em>
<P>Author: <a href="terms.html#authorPEB" tppabs="http://hissa.nist.gov/dads/terms.html#authorPEB">PEB</a>
<H2>Implementation</H2>
<A HREF="javascript:if(confirm('http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/red_black.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/red_black.html'" tppabs="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.ee.uwa.edu.au/%7Eplsd210/ds/red_black.html">analysis, explanation, illustrations, and code (C)</A>
<hr>
Go to the
<A HREF="terms.html" tppabs="http://hissa.nist.gov/dads/terms.html">Algorithms, Data Structures, and Problems</A>
home page.
<hr>
If you have suggestions, corrections, or comments, please get in touch
with
<a href="javascript:if(confirm('http://hissa.nist.gov/~black/black.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://hissa.nist.gov/~black/black.html'" tppabs="http://hissa.nist.gov/~black/black.html">Paul E. Black</a>
(<a href="mailto:paul.black@nist.gov">paul.black@nist.gov</a>).
<p>
Entry modified Thu Jun 17 10:33:06 1999.<BR>
HTML page formatted Wed Dec 22 09:36:20 1999.
<P>
This page's URL is
<A href="redblack.html" tppabs="http://hissa.nist.gov/dads/HTML/redblack.html">http://hissa.nist.gov/dads/HTML/redblack.html</A>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -