Red-Black Tree: Difference between revisions

From Algowiki
Jump to navigation Jump to search
(Created page with "Every node is either red or black. The root is black. The leaves are black. A red node has only black child nodes. If there is a node <math>x</math>, then all nodes from x to...")
 
No edit summary
 
Line 1: Line 1:
Every node is either red or black.
* Every node is either red or black.
The root is black.
* The root is black.
The leaves are black.
* The leaves are black.
A red node has only black child nodes.
* A red node has only black child nodes.
If there is a node <math>x</math>, then all nodes from x to a leaf have the same height.
* If there is a node <math>x</math>, then all nodes from x to a leaf have the same height.

Latest revision as of 12:31, 11 September 2014

  • Every node is either red or black.
  • The root is black.
  • The leaves are black.
  • A red node has only black child nodes.
  • If there is a node [math]\displaystyle{ x }[/math], then all nodes from x to a leaf have the same height.