SlideShare a Scribd company logo
RED BLACK TREE
INSERTION
BY NIKHIL ARORA
(WWW.INTERNETNOTES.IN)
INSERT 20
INSERT 30
SINGLE LEFT ROTATION
INSERT 40
SINGLE LEFT ROTATION
ROOT IS RED CHANGE IT TO BLACK
NOW ROOT IS BLACK
INSERT 50
SINGLE ROTATION
INSERT 15
INSERT 18
INSERT 25 AND SINGLE ROTATION
INSERT 38
INSERT 28 AND ROTATION
AGAIN ROTATION
AGAIN ROTATION
THANKYOU
• PRESENTATION BY NIKHIL ARORA
• WWW.INTERNETNOTES.IN

More Related Content

Viewers also liked

B tree
B treeB tree
B tree
Rajendran
 
Fundamentals of data structures ellis horowitz & sartaj sahni
Fundamentals of data structures   ellis horowitz & sartaj sahniFundamentals of data structures   ellis horowitz & sartaj sahni
Fundamentals of data structures ellis horowitz & sartaj sahniHitesh Wagle
 
Indexing and-hashing
Indexing and-hashingIndexing and-hashing
Indexing and-hashingAmi Ranjit
 
B Trees
B TreesB Trees
Best for b trees
Best for b treesBest for b trees
Best for b trees
DineshRaaja
 
Indexing and hashing
Indexing and hashingIndexing and hashing
Indexing and hashingJeet Poria
 
B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data StructureAnuj Modi
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMSkoolkampus
 

Viewers also liked (15)

B tree long
B tree longB tree long
B tree long
 
B+ Tree
B+ TreeB+ Tree
B+ Tree
 
B tree
B treeB tree
B tree
 
Fundamentals of data structures ellis horowitz & sartaj sahni
Fundamentals of data structures   ellis horowitz & sartaj sahniFundamentals of data structures   ellis horowitz & sartaj sahni
Fundamentals of data structures ellis horowitz & sartaj sahni
 
Red Black Trees
Red Black TreesRed Black Trees
Red Black Trees
 
Indexing and-hashing
Indexing and-hashingIndexing and-hashing
Indexing and-hashing
 
B Trees
B TreesB Trees
B Trees
 
Best for b trees
Best for b treesBest for b trees
Best for b trees
 
Indexing and hashing
Indexing and hashingIndexing and hashing
Indexing and hashing
 
B tree
B treeB tree
B tree
 
b+ tree
b+ treeb+ tree
b+ tree
 
B trees dbms
B trees dbmsB trees dbms
B trees dbms
 
B trees in Data Structure
B trees in Data StructureB trees in Data Structure
B trees in Data Structure
 
Indexing Data Structure
Indexing Data StructureIndexing Data Structure
Indexing Data Structure
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 

Insertion in RED BLACK TREE