LCS algorithm by GO