Data Structure and Algorithms (DSA) MCQs with answers Page - 87

Here, you will find a collection of MCQ questions on Data Structure and Algorithms (DSA). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Which of the following graph traversals closely imitates level order traversal of a binary tree?

  • (A) Depth First Search
  • (B) Breadth First Search
  • (C) Depth & Breadth First Search
  • (D) Binary Search

A

Admin • 833.24K Points
Coach

Q. In a binary search tree, which of the following traversals would print the numbers in the ascending order?

  • (A) Level-order traversal
  • (B) Pre-order traversal
  • (C) Post-order traversal
  • (D) In-order traversal

A

Admin • 833.24K Points
Coach

Q. The number of edges from the root to the node is called of the tree.

  • (A) Height
  • (B) Depth
  • (C) Length
  • (D) Width

A

Admin • 833.24K Points
Coach

Q. The number of edges from the node to the deepest leaf is called of the tree.

  • (A) Height
  • (B) Depth
  • (C) Length
  • (D) Width

A

Admin • 833.24K Points
Coach

Q. What is a full binary tree?

  • (A) Each node has exactly zero or two children
  • (B) Each node has exactly two children
  • (C) All the leaves are at the same level
  • (D) Each node has exactly one or two children

A

Admin • 833.24K Points
Coach

Q. What is a complete binary tree?

  • (A) Each node has exactly zero or two children
  • (B) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from right to left
  • (C) A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right
  • (D) A tree In which all nodes have degree 2

A

Admin • 833.24K Points
Coach

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

  • (A) h = O(loglogn)
  • (B) h = O(nlogn)
  • (C) h = O(n)
  • (D) h = O(log n)

A

Admin • 833.24K Points
Coach

Q. Which of the following is not an advantage of trees?

  • (A) Hierarchical structure
  • (B) Faster search
  • (C) Router algorithms
  • (D) Undo/Redo operations in a notepad

A

Admin • 833.24K Points
Coach

Q. In a full binary tree if number of internal nodes is I, then number of leaves L are?

  • (A) L = 2*I
  • (B) L = I + 1
  • (C) L = I – 1
  • (D) L = 2*I – 1

A

Admin • 833.24K Points
Coach

Q. In a full binary tree if number of internal nodes is I, then number of nodes N are?

  • (A) N = 2*I
  • (B) N = I + 1
  • (C) N = I – 1
  • (D) N = 2*I + 1

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ