<P> The AVL tree is another structure supporting O (log n) search, insertion, and removal . AVL trees can be colored red - black, thus are a subset of RB trees . Worst - case height is 0.720 times the worst - case height of RB trees, so AVL trees are more rigidly balanced . The performance measurements of Ben Pfaff with realistic test cases in 79 runs find AVL to RB ratios between 0.677 and 1.077, median at 0.947, and geometric mean 0.910 . Kind of in between are the WAVL trees . </P> <P> Red--black trees are also particularly valuable in functional programming, where they are one of the most common persistent data structures, used to construct associative arrays and sets which can retain previous versions after mutations . The persistent version of red--black trees requires O (log n) space for each insertion or deletion, in addition to time . </P> <P> For every 2 - 4 tree, there are corresponding red--black trees with data elements in the same order . The insertion and deletion operations on 2 - 4 trees are also equivalent to color - flipping and rotations in red--black trees . This makes 2 - 4 trees an important tool for understanding the logic behind red--black trees, and this is why many introductory algorithm texts introduce 2 - 4 trees just before red--black trees, even though 2 - 4 trees are not often used in practice . </P> <P> In 2008, Sedgewick introduced a simpler version of the red--black tree called the left - leaning red--black tree by eliminating a previously unspecified degree of freedom in the implementation . The LLRB maintains an additional invariant that all red links must lean left except during inserts and deletes . Red--black trees can be made isometric to either 2 - 3 trees, or 2 - 4 trees, for any sequence of operations . The 2 - 4 tree isometry was described in 1978 by Sedgewick . With 2 - 4 trees, the isometry is resolved by a "color flip," corresponding to a split, in which the red color of two children nodes leaves the children and moves to the parent node . </P>

Application of red black tree in real life