Updated Longest common subsequence