Tag - longest common subsequence algorithm