Red-Black Trees

Red-Black Trees

Definition

A red-black tree (RBT) is a type of self-balancing binary search tree that maintains a set of balancing properties after each addition or removal of an element.

RBT Rules

  1. Each node is colored either red or black
  2. The root of the tree must be black
  3. There may not be two consecutive red nodes in any path
  4. Every path from the root to a null node has the same number of black nodes
  5. All leaf nodes are colored black

More Information

Visit geeksforgeeks.org for more information

Email me for more info on data structures!