• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on Binary Trees Data Structure with Answers

Question 21

Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex t at a distance four from the root. If t is the n-th vertex in this BFS traversal, then the maximum possible value of n is ________ [This Question was originally a Fill-in-the-blanks Question]
  • 15
  • 16
  • 31
  • 32

Question 22

In a binary tree, the number of internal nodes of degree 1 is 5, and the number of internal nodes of degree 2 is 10. The number of leaf nodes in the binary tree is  
  • 10
  • 11
  • 12
  • 15

Question 23

The following three are known to be the preorder, inorder and postorder sequences of a binary tree. But it is not known which is which.
MBCAFHPYK
KAMCBYPFH
MABCKYFPH
Pick the true statement from the following.
  • I and II are preorder and inorder sequences, respectively
  • I and III are preorder and postorder sequences, respectively
  • II is the inorder sequence, but nothing more can be said about the other two sequences
  • II and III are the preorder and inorder sequences, respectively

Question 24

A binary tree with n > 1 nodes has n1, n2 and n3 nodes of degree one, two and three respectively. The degree of a node is defined as the number of its neighbors.
n3 can be expressed as
  • n1 + n2 - 1
  • n1 - 2
  • [((n1 + n2)/2)]
  • n2 - 1

Question 25

A binary tree with n > 1 nodes has n1, n2 and n3 nodes of degree one, two and three respectively. The degree of a node is defined as the number of its neighbors.
Starting with the above tree, while there remains a node v of degree two in the tree, add an edge between the two neighbors of v and then remove v from the tree. How many edges will remain at the end of the process?
  • 2 * n1 - 3
  • n2 + 2 * n1 - 2
  • n3 - n2
  • n2 + n1 - 2

Question 26

A binary search tree contains the values 1, 2, 3, 4, 5, 6, 7, 8. The tree is traversed in pre-order and the values are printed out. Which of the following sequences is a valid output?
  • 53124786
  • 53126487
  • 53241678
  • 53124768

Question 27

In the balanced binary tree in the below figure, how many nodes will become unbalanced when a node is inserted as a child of the node “g”?
         a
       /   \\
      b     e
     / \\   /
    c  d  f
   /
  g

  • 1
  • 3
  • 7
  • 8

Question 28

The number of structurally different possible binary trees with 4 nodes is

  • 14

  • 12

  • 336

  • 168

Question 29

A strictly binary tree with 10 leaves

  • cannot have more than 19 nodes

  • has exactly 19 nodes

  • has exactly 17 nodes

  • has exactly 20 nodes

Question 30

What is the maximum height of any AVL tree with 7 nodes? Assume that height of tree with single node is 0.
  • 2
  • 3
  • 4
  • 5

There are 52 questions to complete.

Last Updated :
Take a part in the ongoing discussion