Design and Analysis of Algorithms MCQs with answers Page - 38

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 • 833K Points
Coach

Q. Suppose each edit (insert, delete, replace) has a cost of one. Then, the maximum edit distance cost between the two strings is equal to the length of the larger string.

  • (A) true
  • (B) false
  • (C) ---
  • (D) ---

A

Admin • 833K Points
Coach

Q. Consider the strings “monday” and “tuesday”. What is the edit distance between the two strings?

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

A

Admin • 833K Points
Coach

Q. Consider the two strings “”(empty string) and “abcd”. What is the edit distance between the two strings?

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

A

Admin • 833K Points
Coach

Q. What is the time complexity of the Wagner–Fischer algorithm where “m” and “n” are the lengths of the two strings?

  • (A) o(1)
  • (B) o(n+m)
  • (C) o(mn)
  • (D) o(nlogm)

A

Admin • 833K Points
Coach

Q. Which of the following is NOT a Catalan number?

  • (A) 1
  • (B) 5
  • (C) 14
  • (D) 43

A

Admin • 833K Points
Coach

Q. Which of the following methods can be used to find the nth Catalan number?

  • (A) recursion
  • (B) binomial coefficients
  • (C) dynamic programming
  • (D) recursion, binomial coefficients, dynamic programming

A

Admin • 833K Points
Coach

Q. Which of the following implementations of Catalan numbers has the smallest time complexity?

  • (A) dynamic programming
  • (B) binomial coefficients
  • (C) recursion
  • (D) all have equal time complexity

A

Admin • 833K Points
Coach

Q. Which of the following methods can be used to solve the assembly line scheduling problem?

  • (A) recursion
  • (B) brute force
  • (C) dynamic programming
  • (D) all of the mentioned

A

Admin • 833K Points
Coach

Q. What is the time complexity of the brute force algorithm used to solve the assembly line scheduling problem?

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

A

Admin • 833K Points
Coach

Q. In the dynamic programming implementation of the assembly line scheduling problem, how many lookup tables are required?

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

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