Dynamic Programming Mcqs

Our collections of Multiple choice questions and answers focuses on study of ” Dynamic Programming ” in Data Structures. These questions are chosen from a collection of most authoritative and best reference books on Data Structures. Our aim is to prepare an individual for competitive exams like NTS | GAT | ECAT | Data Warehouse jobs | Data Mining | DB administration jobs Software House and Computer Programmer jobs | University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate knowledge on Dynamic Programming comprehensively.

  1. Home
  2. »
  3. Computer Science Mcqs
  4. »
  5. Data Structures Mcqs
  6. »
  7. Dynamic Programming Mcqs
  8. »
  9. Page 3

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

9

8

7

6

32.
Consider the two matrices P and Q which are 10 x 20 and 20 x 30 matrices respectively. What is the number of multiplications required to multiply the two matrices?

10*20

20*30

10*30

10*20*30

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

0

4

None of the mentioned

Cannot be determined

34.
Fill in the blank to complete the code.

Lookup[tmp] = min_coins

Min_coins = lookup[tmp]

Break

Continue

35.
Find the length of the longest increasing subsequence for the given sequence: {-10, 24, -9, 35, -21, 55, -41, 76, 84}

5

4

3

6

36.
Find the longest increasing subsequence for the given sequence: {10, -10, 12, 9, 10, 15, 13, 14}

{10, 12, 15}

{10, 12, 13, 14}

{-10, 12, 13, 14}

{-10, 9, 10, 13, 14}

40.
For which of the following inputs would Kadane’s algorithm produce a WRONG output?

{1,0,-1}

{-1,-2,-3}

{1,2,3}

{0,0,0}

41.
For which of the following inputs would Kadane’s algorithm produce the CORRECT output?

{0,1,2,3}

{-1,0,1}

{-1,-2,-3,0}

All of the mentioned

42.
For which of the following pairs of strings is the edit distance maximum?

Sunday & monday

Monday & tuesday

Tuesday & wednesday

Wednesday & thursday

43.
For which of the following, the length of the string is equal to the length of the longest palindromic subsequence?

A string that is a palindrome

A string of length one

A string that has all the same letters(e.g. aaaaaa)

All of the mentioned

44.
Given a one-dimensional array of integers, you have to find a sub-array with maximum sum. This is the maximum sub-array sum problem. Which of these methods can be used to solve the problem?

Dynamic programming

Two for loops (naive method)

Divide and conquer

All of the mentioned

45.
Given a rod of length n and the selling prices of all pieces smaller than equal to n, find the most beneficial way of cutting the rod into smaller pieces. This problem is called the rod cutting problem. Which of these methods can be used to solve the rod cutting problem?

Brute force

Dynamic programming

Recursion

All of the mentioned

error: You are not allowed to do so.....
0Shares
0
Scroll to Top