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

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 average case time complexity of binary search using recursion?

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

A

Admin • 833.24K Points
Coach

Q. Which of the following is not an application of binary search?

  • (A) To find the lower/upper bound in an ordered sequence
  • (B) Union of intervals
  • (C) Debugging
  • (D) To search in unordered list

A

Admin • 833.24K Points
Coach

Q. Binary Search can be categorized into which of the following?

  • (A) Brute Force technique
  • (B) Divide and conquer
  • (C) Greedy algorithm
  • (D) Dynamic programming

A

Admin • 833.24K Points
Coach

Q. Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are done until the element is found?

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

A

Admin • 833.24K Points
Coach

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

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

A

Admin • 833.24K Points
Coach

Q. What is the time complexity of binary search with iteration?

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

A

Admin • 833.24K Points
Coach

Q. What is an external sorting algorithm?

  • (A) Algorithm that uses tape or disk during the sort
  • (B) Algorithm that uses main memory during the sort
  • (C) Algorithm that involves swapping
  • (D) Algorithm that are considered ‘in place’

A

Admin • 833.24K Points
Coach

Q. What is an internal sorting algorithm?

  • (A) Algorithm that uses tape or disk during the sort
  • (B) Algorithm that uses main memory during the sort
  • (C) Algorithm that involves swapping
  • (D) Algorithm that are considered ‘in place’

A

Admin • 833.24K Points
Coach

Q. What is the worst case complexity of bubble sort?

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

A

Admin • 833.24K Points
Coach

Q. What is the average case complexity of bubble sort?

  • (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