मुख्य कंटेंट तक स्किप करें
Tree Structures
Self-Balancing Tree

Red-Black Tree Visualizer

A Red-Black Tree is a self-balancing BST that enforces coloring rules to keep the tree height at most 2·log(n+1). Insert values and watch rotations and recolorings restore balance automatically.

Color Properties

Every node is Red or Black.

Rotations

Left/right rotations restore balance.

O(log n) Ops

Guaranteed height bound always holds.

Red-Black Tree Interactive Visualizer

The Red-Black tree is currently empty. Insert values to visualize tree balancing.