
- Data Structures & Algorithms
- DSA - Home
- DSA - Overview
- DSA - Environment Setup
- Algorithm
- DSA - Algorithms Basics
- DSA - Asymptotic Analysis
- DSA - Greedy Algorithms
- DSA - Divide and Conquer
- DSA - Dynamic Programming
- Data Structures
- DSA - Data Structure Basics
- DSA - Array Data Structure
- Stack & Queue
- DSA - Stack
- DSA - Expression Parsing
- DSA - Queue
- Searching Techniques
- DSA - Linear Search
- DSA - Binary Search
- DSA - Interpolation Search
- DSA - Hash Table
- Sorting Techniques
- DSA - Sorting Algorithms
- DSA - Bubble Sort
- DSA - Insertion Sort
- DSA - Selection Sort
- DSA - Merge Sort
- DSA - Shell Sort
- DSA - Quick Sort
- Graph Data Structure
- DSA - Graph Data Structure
- DSA - Depth First Traversal
- DSA - Breadth First Traversal
- Tree Data Structure
- DSA - Tree Data Structure
- DSA - Tree Traversal
- DSA - Binary Search Tree
- DSA - AVL Tree
- DSA - Spanning Tree
- DSA - Heap
- DSA Useful Resources
- DSA - Questions and Answers
- DSA - Quick Guide
- DSA - Useful Resources
- DSA - Discussion
Red-Black Trees in Data Structure
In this section we will see what is the Red-Black Tree. The Red-Black Trees are self-balancing binary search tree. There are some conditions for each node. These are like below −
Each node has color. Which is either Red or Black
The root will be always black
There will be no two adjacent Red nodes
Every path from a node (including root) to any of its descendent NULL node has the same number of black nodes.
Example of Red-black tree
Red-Black tree with Null Nodes at leaf
Comparison with AVL Tree
AVL Trees are more balanced than the Red-Black tree. But the major disadvantage is, there will be more rotations during insertion and deletion. For multiple insertion and deletion, Red-Black tree will be helpful.
- Related Articles
- Insertion in the Red Black Tree in Data Structure
- Huffman Trees in Data Structure
- Splay trees in Data Structure
- Solid Trees in Data Structure
- Range Trees in Data Structure
- BSP Trees in Data Structure
- R-trees in Data Structure
- Interval Trees in Data Structure
- Segment Trees in Data Structure
- Tournament Trees, Winner Trees and Loser Trees in Data Structure
- Optimal Lopsided Trees in Data Structure
- Threaded Binary Trees in Data Structure
- Comparison of Search Trees in Data Structure
- Dynamic Finger Search Trees in Data Structure
- Level Linked (2,4)-Trees in Data Structure

Advertisements