String problems: Longest common substring and longest common subsequence