/* */ Click to Join Live Class with Shankar sir Call 9798158723

Data Structure MCQ - Tree


Q1.The number of edges from the root to the node is called __________ of the tree.
  1. Height
  2. Depth
  3. Length
  4. Width

Answer:- (B)
Explanations :The number of edges from the root to the node is called depth of the tree.
Q2.The number of edges from the node to the deepest leaf is called _________ of the tree.
  1. Height
  2. Depth
  3. Length
  4. Width

Answer:- (A).
Explanations :The number of edges from the node to the deepest leaf is called height of the tree.
Q3.In a full binary tree if number of internal nodes is I, then number of leaves L are?
  1. L = 2*I
  2. L = I + 1
  3. L = I – 1
  4. L = 2*I – 1

Answer:- (B).
Explanations :Number of Leaf nodes in full binary tree is equal to 1 + Number of Internal Nodes i.e L = I + 1
Q4.Construct a binary tree by using postorder and inorder sequences given below. Inorder: N, M, P, O, Q Postorder: N, P, Q, O, M

Answer:- (D).
Explanations :Here,
Postorder Traversal: N, P, Q, O, M
Inorder Traversal: N, M, P, O, Q
Root node of tree is the last visiting node in Postorder traversal. Thus, Root Node = ‘M’.
Q5.Which of the following statement about binary tree is CORRECT?
  1. Every binary tree is either complete or full
  2. Every complete binary tree is also a full binary tree
  3. Every full binary tree is also a complete binary tree
  4. A binary tree cannot be both complete and full

Answer:- (C).
Q6.If a node having two children is to be deleted from binary search tree, it is replaced by its
  1. In-order predecessor
  2. In-order successor
  3. Pre-order predecessor
  4. None

Answer:- (B).
Q7.A threaded binary tree is a binary tree in which every node that does not have right child has a thread to its
  1. Pre-order successor
  2. In-order successor
  3. Post-order successor
  4. In-order predecessor

Answer:- (B).
Q8.Suppose we have numbers between 1 and 1000 in a binary search tree and want to search for the number 363. Which of the following sequence could not be the sequence of the node examined?
  1. 2, 252, 401, 398, 330, 344, 397, 363
  2. 924, 220, 911, 244, 898, 258, 362, 363
  3. 925, 202, 911, 240, 912, 245, 258, 363
  4. 2, 399, 387, 219, 266, 382, 381, 278, 363

Answer:- (C).
Q9.If two trees have same structure and but different node content, then they are called ___
  1. Synonyms trees
  2. Joint trees
  3. Equivalent trees
  4. Similar trees

Answer:- (D).
Explanations :
Q10.Which of the following options is an application of splay trees ?
  1. cache Implementation
  2. networks
  3. send values
  4. receive values

Answer:- (A).
Explanations :Splay trees can be used for faster access to recently accessed items and hence used for cache implementation