red Black Tree Algorithm

A red – black tree is a kind of self-balancing binary search tree in computer science. When the tree is modify, the new tree is subsequently rearranged and repainted to restore the coloring property. In a 1978 paper," A Dichromatic Framework for Balanced Trees", Leonidas J. Guibas and Robert Sedgewick derived the red-black tree from the symmetric binary B-tree. Sedgewick originally allowed nodes whose two children are red, make his trees more like 2-3-4 trees, but later this restriction was added, make new trees more like 2-3 trees. These trees maintained all paths from root to leaf with the same number of nodes, make perfectly balanced trees.

red Black Tree source code, pseudocode and analysis