Top 80+ Solved Non Linear Data Structures - Trees MCQ Questions Answer

From 1 to 15 of 71

Q. The following given tree is an example for?

a. Binary tree

b. Binary search tree

c. Fibonacci tree

d. none

  • a. Binary tree

Q. What is the traversal strategy used in the binary tree?

a. depth-first traversal

b. breadth-first traversal

c. random traversal

d. Priority traversal

  • b. breadth-first traversal

Q. What operation does the following diagram depict?

a. inserting a leaf node

b. inserting an internal node

c. deleting a node with 0 or 1 child

d. none

  • c. deleting a node with 0 or 1 child

Q. How many bits would a succinct binary tree occupy?

a. n+O(n)

b. 2n+O(n)

c. n/2

d. n

  • b. 2n+O(n)

Q. Using what formula can a parent node be located in an array?

a. (i+1)/2

b. (i-1)/2

c. i/2

d. 2i/2

  • b. (i-1)/2

Q. Which of the following properties are obeyed by all three tree – traversals?

a. Left subtrees are visited before right subtrees

b. Right subtrees are visited before left subtrees

c. Root node is visited before left subtree

d. Root node is visited before right subtree

  • a. Left subtrees are visited before right subtrees

Q. For the tree below, write the pre-order traversal.

a. 2, 7, 2, 6, 5, 11, 5, 9, 4

b. 2, 7, 5, 2, 6, 9, 5, 11, 4

c. 2, 5, 11, 6, 7, 4, 9, 5, 2

d. none

  • a. 2, 7, 2, 6, 5, 11, 5, 9, 4

Q. For the tree below, write the post-order traversal.

a. 2, 7, 2, 6, 5, 11, 5, 9, 4

b. 2, 7, 5, 2, 6, 9, 5, 11, 4

c. 2, 5, 11, 6, 7, 4, 9, 5, 2

d. none

  • c. 2, 5, 11, 6, 7, 4, 9, 5, 2

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

a. O(1)

b. O(n)

c. O(logn)

d. O(nlogn)

  • b. O(n)
Subscribe Now

Get All Updates & News