MCQ bookmark_border 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? A 50-black root, 18-red left subtree, 100-red right subtree B 50-red root, 18-red left subtree, 100-red right subtree C 50-black root, 18-black left subtree, 100-red right subtree D 50-black root, 18-red left subtree, 100-black right subtree Correct Answer: A None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 72. What are the operations that could be performed in O(logn) time complexity by red-black tree? A insertion, deletion, finding predecessor, successor B only insertion C only finding predecessor, successor D for sorting Correct Answer: A None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 73. Which of the following is an application of Red-black trees and why? A used to store strings efficiently B used to store integers efficiently C can be used in process schedulers, maps, sets D for efficient sorting Correct Answer: C None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 74. When it would be optimal to prefer Red-black trees over AVL trees? A when there are more insertions or deletions B when more search is needed C when tree must be balanced D when log(nodes) time complexity is needed Correct Answer: A None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 75. Why Red-black trees are preferred over hash tables though hash tables have constant time complexity? A no they are not preferred B because of resizing issues of hash table and better ordering in redblack trees C because they can be implemented using trees D because they are balanced Correct Answer: B None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 76. How can you save memory when storing color information in Red-Black tree? A using least significant bit of one of the pointers in the node for color information B using another array with colors of each node C storing color information in the node structure D using negative and positive numbering Correct Answer: A None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 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 A insert a new node B delete a node C search a node D count the number of nodes Correct Answer: A None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 78. After the insertion operation, is the resultant tree a splay tee? A 1 C May be D Can't say Correct Answer: A None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 79. What must be the ideal size of array if the height of tree is A 2^l-1 B l-1 C l D 2l Correct Answer: A None. Check Answer report_problem Report forum Discussion
MCQ bookmark_border 80. Can a tree stored in an array using either one of inorder or post order or pre order traversals be again reformed? A yes just traverse through the array and form the tree B No we need one more traversal to form a tree C No in case of sparse trees D None of the mentioned Correct Answer: B None. Check Answer report_problem Report forum Discussion