Leetcode Longest Common Sequence Problem Solving