RBT Insertion Steps

  1. Insert the node like Binary Search Tree
  2. Fix Violations after the insertion
  3. If the parent of the newly inserted node is black, there was no violation
  4. If the parent is red, the tree violates the red property and needs to be fixed

RBT Uses

Red Black Trees are self-balancing and are often used for implementing data structures such as maps and priority queues.

Red-Black Tree