Update Longest Common subsequence