Design and Analysis of Algorithms MCQs with answers Page - 17

Here, you will find a collection of MCQ questions on Design and Analysis of Algorithms. 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 • 831.35K Points
Coach

Q. What is the bidirectional variant of selection sort?

  • (A) cocktail sort
  • (B) bogo sort
  • (C) gnome sort
  • (D) bubble sort

A

Admin • 831.35K Points
Coach

Q. Which of the following methods can be used to find the largest and smallest element in an array?

  • (A) recursion
  • (B) iteration
  • (C) both recursion and iteration
  • (D) no method is suitable

A

Admin • 831.35K Points
Coach

Q. What is the number of swaps required to sort the array arr={5,3,2,4,1} using recursive selection sort?

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

A

Admin • 831.35K Points
Coach

Q. Which of the following methods can be used to find the largest and smallest number in a linked list?

  • (A) recursion
  • (B) iteration
  • (C) both recursion and iteration
  • (D) impossible to find the largest and smallest numbers

A

Admin • 831.35K Points
Coach

Q. Which of the following techniques can be used to search an element in an unsorted array?

  • (A) iterative linear search
  • (B) recursive binary search
  • (C) iterative binary search
  • (D) normal binary search

A

Admin • 831.35K Points
Coach

Q. Consider the array {1,1,1,1,1}. Select the wrong option?

  • (A) iterative linear search can be used to search for the elements in the given array
  • (B) recursive linear search can be used to search for the elements in the given array
  • (C) recursive binary search can be used to search for the elements in the given array
  • (D) no method is defined to search for an element in the given array

A

Admin • 831.35K Points
Coach

Q. What is the time complexity of the above recursive implementation of binary search?

  • (A) o(n)
  • (B) o(2n)
  • (C) o(logn)
  • (D) o(n!)

A

Admin • 831.35K Points
Coach

Q. Which of the following methods can be used to search an element in a linked list?

  • (A) iterative linear search
  • (B) iterative binary search
  • (C) recursive binary search
  • (D) normal binary search

A

Admin • 831.35K Points
Coach

Q. Can binary search be applied on a sorted linked list in O(Logn) time?

  • (A) no
  • (B) yes
  • (C) ---
  • (D) ---

A

Admin • 831.35K Points
Coach

Q. Recursive program to raise an integer x to power y uses which of the following algorithm?

  • (A) dynamic programming
  • (B) backtracking
  • (C) divide and conquer
  • (D) greedy algorithm

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