Red Black Tree in Data Structure | Red Black Tree Insertion Example | PART 5.4

Nargish Gupta
Youtube
Related Topic
:- programming skills Data Structures

In this video, I have discussed red-black tree insertion with the help of an example. There are basically 4 basic properties/ rules of the red-black tree: 1. The node colour is either red or black. 2. Root node is always black. 3. No red colour parent-child relationship. 4. Root node to leaf node in each and every path Black Node should be the same. To insert a node into a red-black tree there are some properties/rules: 1. Create a black root node if the tree is empty. 2. Insert new node as red i. If a sibling is red then recolour ii. If a sibling is black or absent then rotate and recolour 

Comments