Shortest Common Subsequence Leetcode Problems Python