concept of insert element in red black tree
Answers
Answered by
0
Red - Black Tree is another varient of Binary Search Tree in which every node is colored either RED or BLACK. We can define a Red Black Tree as follows...
In a Red Black Tree the color of a node is decided based on the Red Black Tree properties. Every Red Black Tree has the following properties.
Properties of Red Black Tree
Property #1: Red - Black Tree must be a Binary Search Tree.
Property #2: The ROOT node must colored BLACK.
Property #3: The children of Red colored node must colored BLACK. (There should not be two consecutive RED nodes).
Property #4: In all the paths of the tree there must be same number of BLACK colored nodes.
Property #5: Every new node must inserted with RED color.
Property #6: Every leaf (e.i. NULL node) must colored BLACK.
In a Red Black Tree the color of a node is decided based on the Red Black Tree properties. Every Red Black Tree has the following properties.
Properties of Red Black Tree
Property #1: Red - Black Tree must be a Binary Search Tree.
Property #2: The ROOT node must colored BLACK.
Property #3: The children of Red colored node must colored BLACK. (There should not be two consecutive RED nodes).
Property #4: In all the paths of the tree there must be same number of BLACK colored nodes.
Property #5: Every new node must inserted with RED color.
Property #6: Every leaf (e.i. NULL node) must colored BLACK.
tanuj291734:
do you love me will you marry me
Similar questions
Math,
7 months ago
Computer Science,
7 months ago
India Languages,
7 months ago
Math,
1 year ago
Math,
1 year ago