Inserting into a Red-Black Tree

Steps:

  1. Insert new value using BST insertion algorithm
  2. Color the new node red
  3. Check Red-Black tree properties and restore if necessary

Repairing Red Node With Red Child:

Helpful link for visualizing RBT insertions:

www.cs.usfca.edu/~galles/visualization/RedBlack.html