$30
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 hABDi is a subsequence of hABCDEFi 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
BDCABA
BCBA
Table 1: A sample input and corresponding output
And don’t copy :)
1