出典:Wiktionary
出典:『Wiktionary』 (2025/04/05 07:36 UTC 版)
red-black tree (plural red-black trees)
出典:Wikipedia
出典:『Wikipedia』 (2011/07/02 04:54 UTC 版)
A red–black tree is a type of self-balancing binary search tree, a data structure used in computer science, typically to implement associative arrays. The original structure was invented in 1972 by Rudolf Bayer and named "symmetric binary B-tree," but acquired its modern name in a paper in 1978 by Leonidas J. Guibas and Robert Sedgewick. It is complex, but has good worst-case running time for its operations and is efficient in practice: it can search, insert, and delete in O(log n) time, where n is total number of elements in the tree. Put very simply, a red–black tree is a binary search tree that inserts and deletes intelligently, to ensure the tree is reasonably balanced.