added longest common subsequence with dynamic programming