Menu

Trees Questions

MCQ
71.
Consider the below formations of red-black tree. All the below formations are incorrect for it to be a redblack tree. Then what may be the correct order?

data-structure-questions-answers-red-black-tree-q3
forum Discussion
MCQ
72.
What are the operations that could be performed in O(logn) time complexity by red-black tree?
forum Discussion
MCQ
73.
Which of the following is an application of Red-black trees and why?
forum Discussion
MCQ
74.
When it would be optimal to prefer Red-black trees over AVL trees?
forum Discussion
MCQ
75.
Why Red-black trees are preferred over hash tables though hash tables have constant time complexity?
forum Discussion
MCQ
76.
How can you save memory when storing color information in Red-Black tree?
forum Discussion
MCQ
77.
What is the below pseudo code trying to do, where pt is a node pointer and root pointer.

redblack(Node root, Node pt) :
    if (root == NULL)
       return pt
 
    if (pt.data < root.data)
    {
        root.left  =   redblack(root.left, pt);
        root.left.parent = root
    }
    else if (pt.data > root.data)
    {
        root.right = redblackt(root.right, pt)
        root.right.parent = root
    }
   return root
forum Discussion
MCQ
78.
After the insertion operation, is the resultant tree a splay tee?
forum Discussion
MCQ
79.
What must be the ideal size of array if the height of tree is
forum Discussion
MCQ
80.
Can a tree stored in an array using either one of inorder or post order or pre order traversals be again reformed?
forum Discussion