Red Black Trees

red black tree

What is a Red Black Tree

a red black tree is a self-balancing binary search tree. Most useful for its fast storage and retreival

Red Black Tree Properties

  1. Every node is either red or black.
  2. All null nodes are considered black.
  3. A red node does not have a red child.
  4. Every path from a given node to any of its leaf nodes (that is, to any descendant null node) goes through the same number of black nodes.

For more info visit Geeks to Geeks Red-Black Tree.