Longest common subsequence

All Good. May be bad part of code.