Left-leaning red–black tree


A left-leaning red–black tree is a type of self-balancing binary search tree. It is a variant of the red–black tree and guarantees the same asymptotic complexity for operations, but is designed to be easier to implement.

Properties of a left-leaning red–black tree

All of the red-black tree algorithms that have been proposed are characterized by a worst-case search time bounded by a small constant multiple of in a tree of keys, and the behavior observed in practice is typically that same multiple faster than the worst-case bound, close to the optimal nodes examined that would be observed in a perfectly balanced tree.
Specifically, in a left-leaning red-black 2-3 tree built from random keys:
AuthorDateLanguageVariantNotesLink
Robert Sedgewick2008JavaFrom
David Anson2 Jun 2009C#
kazu-yamamoto2011Haskell
Lee Stanza2010C++Includes discussion
Jason Evans2010C2-3
Nicola BortignonDecember 8, 2010ActionScript 3
william at 25thandClement.com2011C2-3 variant using iteration with parent pointers
Maciej Piechotka2009Vala
Petar Maymounkov2010Go2-3
Sebastien Chapuis2015C
Seungyoung Kim2015C2-3-4 variant
Robin Heggelund Hansen2018Elm
R Pratap Chakravarthy2019Rust

Other