1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. Consider the strings “PQRSTPQRS” and “PR...
Q.

Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is the length of the longest common subsequence?

A. 9
B. 8
C. 7
D. 6
Answer» C. 7
Explanation: the longest common subsequence is “prtpqrs” and its length is 7.

Discussion