To find and print longest common subsequence
What is LCS?
Given 2 sequences X and Y, find a maximum length subsquence Z.
Example:
X = ABCDBAB, Y = BDCABA
A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous.
Subsequences may be ABA, BCA, BBA, BCBA, BDAB etc.
Here, LCS = BCBA and BDAB