Red Black Tree

Description

Red Black Tree(RBT) is a data structure which is balancing version of a binary search tree the following is the features of RBT:

  1. Each node in the tree is black or red
  2. The number of black nodes on the paths from any node to null nodes is equal
  3. A red node can not have a red parent or red node cannot have a red child

Valid Red Black Tree Example:

For more information on red black trees click here:

geeksforgeeks