Longest Common Subsequence code updated