Computer Science EngineeringHardISRO SC (CS)

The length of a longest common subsequence of DAAAADDCBB and CBCCDCBBA is:

  1. A. 5
  2. B. 3
  3. C. 4
  4. D. 9

Correct answer: C. 4

Fill the LCS table d[i][j]; the answer is 4 (the longest common substring would be only 4).

More Algorithms, Data Structures & Programming (ISRO CS) questions

Exams that ask this topic