ProgrammingVery hard

The length of the longest common subsequence of "ABCBDAB" and "BDCAB" is what?

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

Correct answer: A. 4

A longest common subsequence is B, C, A, B (or B, D, A, B), of length 4. The standard 2D table gives the same value.

More C Programming questions

Exams that ask this topic