McqMate

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 |

Answer» C. both recursion and dynamic programming | |

Explanation: both recursion and dynamic programming can be used to solve the longest subsequence problem. |

1.1k

0

Do you find this helpful?

1

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- The longest increasing subsequence problem is a problem to find the length of a subsequence from a sequence of array elements such that the subsequence is sorted in increasing order and it’s length is maximum. This problem can be solved using
- Which of the following methods can be used to solve the longest palindromic subsequence problem?
- 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?
- Which of the following problems can be solved using the longest subsequence problem?
- You are given n dice each having f faces. You have to find the number of ways in which a sum of S can be achieved. This is the dice throw problem. Which of the following methods can be used to solve the dice throw problem?
- What is the time complexity of the brute force algorithm used to find the longest common subsequence?
- Given an array, check if the array can be divided into two subsets such that the sum of elements of the two subsets is equal. This is the balanced partition problem. Which of the following methods can be used to solve the balanced partition problem?
- Which of the following is the longest common subsequence between the strings “hbcfgmnapq” and “cbhgrsfnmq” ?
- Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is the length of the longest common subsequence?
- Longest common subsequence is an example of