add solution to longest common subsequence