longest common subsequence notes 519247