Review the LCS algorithm.