1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. 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.

Discussion