longest common substring and subsequence