Why do we impose restrictions like . root property is black . every leaf is black . children of red node are black . all leaves have same black

Why do we impose restrictions like . root property is black . every leaf is black . children of red node are black . all leaves have same black Correct Answer to get logarithm time complexity

We impose such restrictions to achieve self balancing trees with logarithmic complexities for insertions, deletions, search.
Bissoy MCQ

Related Questions

The following lines talks about deleting a node in a binary tree.(the tree property must not be violated after deletion) i) from root search for the node to be deleted ii) iii) delete the node at what must be statement ii) and fill up statement iii)
Statement 1: When a node is split during insertion, the middle key is promoted to the parent as well as retained in right half-node. Statement 2: When a key is deleted from the leaf, it is also deleted from the non-leaf nodes of the tree.