The Longest Common Subsequence Via Generalized Suffix Trees