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

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. What is the value of the sum of the minimum in-degree and maximum out-degree of an Directed Acyclic Graph?

  • (A) Depends on a Graph
  • (B) Will always be zero
  • (C) Will always be greater than zero
  • (D) May be zero or greater than zero

A

Admin • 833.24K Points
Coach

Q. Where is linear searching used?

  • (A) When the list has only a few elements
  • (B) When performing a single search in an unordered list
  • (C) Used all the time
  • (D) When the list has only a few elements and When performing a single search in an unordered list

A

Admin • 833.24K Points
Coach

Q. What is the best case for linear search?

  • (A) O(nlogn)
  • (B) O(logn)
  • (C) O(n)
  • (D) O(1)

A

Admin • 833.24K Points
Coach

Q. What is the worst case for linear search?

  • (A) O(nlogn)
  • (B) O(logn)
  • (C) O(n)
  • (D) O(1)

A

Admin • 833.24K Points
Coach

Q. What is the best case and worst case complexity of ordered linear search?

  • (A) O(nlogn), O(logn)
  • (B) O(logn), O(nlogn)
  • (C) O(n), O(1)
  • (D) O(1), O(n)

A

Admin • 833.24K Points
Coach

Q. Which of the following is a disadvantage of linear search?

  • (A) Requires more space
  • (B) Greater time complexities compared to other searching algorithms
  • (C) Not easy to understand
  • (D) Not easy to implement

A

Admin • 833.24K Points
Coach

Q. What is the advantage of recursive approach than an iterative approach?

  • (A) Consumes less memory
  • (B) Less code and easy to implement
  • (C) Consumes more memory
  • (D) More code has to be written

A

Admin • 833.24K Points
Coach

Q. Given an input arr = {2,5,7,99,899}; key = 899; What is the level of recursion?

  • (A) 5
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 833.24K Points
Coach

Q. Given an array arr = {45,77,89,90,94,99,100} and key = 99; what are the mid values(corresponding array elements) in the first and second levels of recursion?

  • (A) 90 and 99
  • (B) 90 and 94
  • (C) 89 and 99
  • (D) 89 and 94

A

Admin • 833.24K Points
Coach

Q. What is the worst case complexity of binary search using recursion?

  • (A) O(nlogn)
  • (B) O(logn)
  • (C) O(n)
  • (D) O(n2)

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