Shortest Common Subsequence Leetcode Solutions Java