In this assignment you will have to implement the Longest Common Subsequence (LCS) problem. In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. For example, the sequence ⟨ABD⟩ is a subsequence of ⟨ABCDEF⟩ obtained after removal of elements C,E, and F . The relative order of the elements remains invariant.
The input will have two lines, one for each sequence. You will have to print as output their LCS. A sample is given below for easier understanding.
Input Output
ABCBDAE BCBA BDCABA
Table 1: A sample input and corresponding output
And don’t copy 🙂
1


