Red-Black Tree Demo

A Red-Black Tree is a self-balancing binary search tree where each node has an extra bit for color (red or black). These trees ensure that the tree remains approximately balanced during insertions and deletions.

Tree Operations

Sample Trees

Traversal Options

Tree Information

Nodes: 0

Height: 0

Root: None

Red-Black Tree Properties

1. Every node is either RED or BLACK
2. The root is always BLACK
3. All leaves (NIL) are BLACK
4. A RED node cannot have a RED child
5. All paths from a node to its leaves have the same number of BLACK nodes

Operation Log

Welcome to Red-Black Tree Demo. Start by inserting a node.