Design and Analysis of Algorithms MCQs with answers Page - 12

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. Which of the following methods can be used to solve the matrix chain multiplication problem?

  • (A) dynamic programming
  • (B) brute force
  • (C) recursion
  • (D) dynamic programming, brute force, recursion

A

Admin • 831.35K Points
Coach

Q. Consider the matrices P, Q and R which are 10 x 20, 20 x 30 and 30 x 40 matrices respectively. What is the minimum number of multiplications required to multiply the three matrices?

  • (A) 18000
  • (B) 12000
  • (C) 24000
  • (D) 32000

A

Admin • 831.35K Points
Coach

Q. Consider the brute force implementation in which we find all the possible ways of multiplying the given set of n matrices. What is the time complexity of this implementation?

  • (A) o(n!)
  • (B) o(n3)
  • (C) o(n2)
  • (D) exponential

A

Admin • 831.35K Points
Coach

Q. Which of the following methods can be used to solve the longest common subsequence problem?

  • (A) recursion
  • (B) dynamic programming
  • (C) both recursion and dynamic programming
  • (D) greedy algorithm

A

Admin • 831.35K Points
Coach

Q. Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is the length of the longest common subsequence?

  • (A) 9
  • (B) 8
  • (C) 7
  • (D) 6

A

Admin • 831.35K Points
Coach

Q. Which of the following problems can be solved using the longest subsequence problem?

  • (A) longest increasing subsequence
  • (B) longest palindromic subsequence
  • (C) longest bitonic subsequence
  • (D) longest decreasing subsequence

A

Admin • 831.35K Points
Coach

Q. Longest common subsequence is an example of

  • (A) greedy algorithm
  • (B) 2d dynamic programming
  • (C) 1d dynamic programming
  • (D) divide and conquer

A

Admin • 831.35K Points
Coach

Q. What is the time complexity of the brute force algorithm used to find the longest common subsequence?

  • (A) o(n)
  • (B) o(n2)
  • (C) o(n3)
  • (D) o(2n)

A

Admin • 831.35K Points
Coach

Q. Which of the following is the longest common subsequence between the strings “hbcfgmnapq” and “cbhgrsfnmq” ?

  • (A) hgmq
  • (B) cfnq
  • (C) bfmq
  • (D) fgmna

A

Admin • 831.35K Points
Coach

Q. Which of the following methods can be used to solve the longest palindromic subsequence problem?

  • (A) dynamic programming
  • (B) recursion
  • (C) brute force
  • (D) dynamic programming, recursion, brute force

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