- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- Which of the following is the longest co...

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

A. | hgmq |

B. | cfnq |

C. | bfmq |

D. | fgmna |

Answer» D. fgmna | |

Explanation: the length of the longest common subsequence is 4. but ‘fgmna’ is not the longest common subsequence as its length is 5. |

View all MCQs in:
Design and Analysis of Algorithms

- 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
- Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is the length of the longest common subsequence?
- Which of the following methods can be used to solve the longest common subsequence problem?
- Longest common subsequence is an example of
- What is the time complexity of the brute force algorithm used to find the longest common subsequence?
- Consider the strings “monday” and “tuesday”. What is the edit distance between the two strings?
- Consider the two strings “”(empty string) and “abcd”. What is the edit distance between the two strings?
- Which of the following problems can be solved using the longest subsequence problem?
- Which of the following methods can be used to solve the longest palindromic subsequence problem?
- For which of the following, the length of the string is not equal to the length of the longest palindromic subsequence?

Login to Continue

It will take less than 2 minutes

Report MCQ