1.

Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is the length of the longest common subsequence?(a) 9(b) 8(c) 7(d) 6This question was addressed to me in quiz.My doubt stems from Longest Common Subsequence in section Dynamic Programming of Data Structures & Algorithms II

Answer»

The correct option is (C) 7

For EXPLANATION: The LONGEST common subsequence is “PRTPQRS” and its LENGTH is 7.



Discussion

No Comment Found

Related InterviewSolutions