Computer Science EngineeringVery hard

The length of a longest common subsequence of ABCBDAB and BDCABA is

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

Correct answer: B. 4

One LCS is BCBA (length 4) and no common subsequence of length 5 exists.

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

Exams that ask this topic