Find longest common subsequence between two strings