Red Black Tree - Insertion

Описание к видео Red Black Tree - Insertion

RBTs are “balanced” in order to guarantee O(lg n) worst case time for set dynamic operations.
A binary search tree is a red-black tree if:
Every node is either red or black
The root is black
Every leaf (NIL) is black
A red node’s children are black
For each node, all paths from a node to descendant leaves contain the same number of black nodes
No two consecutive node in red

Комментарии

Информация по комментариям в разработке