Implementation of the LCS

(Longest common subsequence)