Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Red-black tree, black height?

Ook bekend als: red-black tree · black height · left-leaning red-black tree

Definition 17.11 University Computer Science — Year 1 · Hoofdstuk 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.
Lees in het hoofdstuk →