ExamVeda
Login
Home
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
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
32
What is the maximum height of an AVL tree with p nodes?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
33
The maximum number of nodes in a tree for which post-order and pre-order traversals may be equal is . . . . . . . .
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
34
Figure below is a balanced binary tree. If a node inserted as child of the node R, how many nodes will become unbalanced?
Binary Search Trees(B Tree) mcq question image
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
35
In a full binary tree if there are L leaves, then total number of nodes N are?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
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)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
Can a tree stored in an array using either one of inorder or post order or pre order traversals be again reformed?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
38
Is it true that splay trees have O(logn) amortized complexity ?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
39
What is the space complexity of a treap algorithm?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
40
Why we need to a binary tree which is height balanced?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board