Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Red-black tree, black height » ?

Aussi appelé : red-black tree · black height · left-leaning red-black tree

Definition 17.11 University Computer Science — Year 1 · Chapitre 17 — Binary Search Trees and Balanced Trees

A red-black tree is a binary search tree whose nodes are coloured red or black, such that the root is black, a red node has no red child, and every path from a node down to an empty subtree contains the same number of black nodes, the black height of the node. A left-leaning red-black tree is a red-black tree in which every red node is a left child.

Left: the left-leaning red-black tree of , red nodes shaded; every path from the root to an empty subtree meets three black nodes. Right: the same tree read as a 2-3 tree, each red node merged with its parent: all leaves at depth 2.
Left: the left-leaning red-black tree of Output 17.5, red nodes shaded; every path from the root to an empty subtree meets three black nodes. Right: the same tree read as a 2-3 tree, each red node merged with its parent: all leaves at depth 2.
Lire dans le chapitre →