GATE | Sudo GATE 2020 Mock I (27 December 2019) | Question 34
Consider two strings A = “gttctagaa” and B = “ctttggttc”. Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and let y be the number of such longest common subsequences between A and B.
Then x + y = ____________.
Explanation: LCS length is 4:
= x+y = 4+2 = 6
Option (A) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.