Red Black Tree

Introduction

A red-black tree is a BST with two node types, namely red and black, and supporting operations that ensure the tree is balanced when a node is inserted or removed.

A tree with N nodes will have a height of O(log N).

Basic rules

Red Black Tree graph

RBT Graph

To learn about Red Black Tree.Link