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.

Which of the following is the correct definition for a horizontal link?

  1. A. connection between node and a child of equal levels
  2. B. connection between two nodes
  3. C. connection between two child nodes
  4. D. connection between root node and leaf node
Report Error

What are the two different operations done in an AA-Tree?

  1. A. shift and color
  2. B. skew and split
  3. C. zig and zag
  4. D. enqueue and dequeue
Report Error

What is the average case time complexity for finding the height of the binary tree?

  1. A. h = O(loglogn)
  2. B. h = O(nlogn)
  3. C. h = O(n)
  4. D. h = O(log n)
Report Error

For the tree below, write the in-order traversal.

  1. A. 6, 2, 5, 7, 11, 2, 5, 9, 4
  2. B. 6, 5, 2, 11, 7, 4, 9, 5, 2
  3. C. 2, 7, 2, 6, 5, 11, 5, 9, 4
  4. D. 2, 7, 6, 5, 11, 2, 9, 5, 4
Report Error

Which type of binary tree does rope require to perform basic operations?

  1. A. Unbalanced
  2. B. Balanced
  3. C. Complete
  4. D. Full
Report Error

An AVL tree is a self - balancing binary search tree, in which the heights of the two child sub trees of any node differ by . . . . . . . .

  1. A. At least one
  2. B. At most one
  3. C. Two
  4. D. At most two
Report Error

A treap is a combination of a tree and a heap.

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

What is the time complexity for searching k+1 auxiliary trees?

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

Which node has the lowest priority in a treap?

  1. A. root node
  2. B. leaf node
  3. C. null node
  4. D. centre node
Report Error

Which of the following is incorrect with respect to binary trees?

  1. A. Let T be a binary tree. For every k ≥ 0, there are no more than 2k nodes in level k
  2. B. Let T be a binary tree with λ levels. Then T has no more than 2 λ – 1 nodes
  3. C. Let T be a binary tree with N nodes. Then the number of levels is at least ceil(log (N + 1))
  4. D. Let T be a binary tree with N nodes. Then the number of levels is at least floor(log (N + 1))
Report Error

How can you save memory when storing color information in Red-Black tree?

  1. A. using least significant bit of one of the pointers in the node for color information
  2. B. using another array with colors of each node
  3. C. storing color information in the node structure
  4. D. using negative and positive numbering
Report Error

What is the prime condition of AA-tree which makes it simpler than a red-black tree?

  1. A. Only right children can be red
  2. B. Only left children can be red
  3. C. Right children should strictly be black
  4. D. There should be no left children
Report Error