31.
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

36.
Why the below pseudo code where x is a value, wt is weight factor and t is root node can't insert?
WeightBalanceTreeNode insert(int x, int wt, WeightBalanceTreeNode k) :
 
   if (k == null)
        k = new WeightBalanceTreeNode(x, wt, null, null)
   else if (x < t.element) :
 
        k.left = insert (x, wt, k.left)
        if (k.left.weight < k.weight)
            k = rotateWithRightChild (k)
 
    else if (x > t.element) :
 
        k.right = insert (x, wt, k.right)
        if (k.right.weight < k.weight)
            k = rotateWithLeftChild (k)

37.
Can a tree stored in an array using either one of inorder or post order or pre order traversals be again reformed?

Read More Section(Binary Search Trees(B Tree))

Each Section contains maximum 100 MCQs question on Binary Search Trees(B Tree). To get more questions visit other sections.