Commerce

Binary Search TreesB Tree MCQs

Practice Binary Search TreesB Tree MCQs for competitive exams.

Binary Search TreesB Tree MCQs

Practice questions from this topic.

How will you remove a left horizontal link in an AA-tree?

  1. A. by performing right rotation
  2. B. by performing left rotation
  3. C. by deleting both the elements
  4. D. by inserting a new element
Report Error

What is the time complexity of pre-order traversal in the iterative fashion?

  1. A. O(1)
  2. B. O(n)
  3. C. O(logn)
  4. D. O(nlogn)
Report Error

What is the upper bound for a tango tree if k is a number of interleaves?

  1. A. k+2 O (log (log n))
  2. B. k O (log n)
  3. C. K 2 O (log n)
  4. D. k+1 O (log (log n))
Report Error

Which of the following tree data structures is not a balanced binary tree?

  1. A. AVL tree
  2. B. Red-black tree
  3. C. Splay tree
  4. D. B-tree
Report Error

What is the time complexity for splitting the string into two new string in the rope data structure?

  1. A. O (n 2 )
  2. B. O (n!)
  3. C. O (log n)
  4. D. O (1)
Report Error

How many edges are present in Edge cluster?

  1. A. 0
  2. B. 1
  3. C. 2
  4. D. 4
Report Error

In an AA-tree, we process split first, followed by a skew.

  1. A. True
  2. B. False
Report Error

What is the time complexity for inserting the string and forming a new string in the rope data structure?

  1. A. O (log n)
  2. B. O (n!)
  3. C. O (n 2 )
  4. D. O (1)
Report Error

Elements in a tree can be indexed by its position under the ordering of the keys and the ordinal position of an element can be determined, both with good efficiency.

  1. A. true
  2. B. false
Report Error

How will you find the minimum element in a binary search tree?

  1. A. public void min(Tree root) { while(root.left() != null) { root = root.left(); } System.out.println(root.data()); }
  2. B. public void min(Tree root) { while(root != null) { root = root.left(); } System.out.println(root.data()); }
  3. C. public void min(Tree root) { while(root.right() != null) { root = root.right(); } System.out.println(root.data()); }
  4. D. public void min(Tree root) { while(root != null) { root = root.right(); } System.out.println(root.data()); }
Report Error

Which of the following are used as an internal operation in Top tree?

  1. A. Merge
  2. B. Cut
  3. C. Expose
  4. D. Link
Report Error

What is the expected depth of a node in a randomized binary search tree?

  1. A. log n
  2. B. n!
  3. C. n 2
  4. D. 2 log n + O(1)
Report Error