GATE Computer ScienceModerateNIELIT Scientist B

What is the length of a longest common subsequence of PROGRAMMING and ALGORITHM?

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

Correct answer: C. 3

The LCS table for the two strings gives length 3.

More Algorithms questions

Exams that ask this topic