Loading topic
solve(i, j) is the LCS length of the suffixes a[i:] and b[j:]:2 min readdp[i][j] holds the LCS length of the first i characters of a and the first j characters of b. You should also be comfortable with 0-based and 1-based index shifts in Python.2 min readm = len(a) and n = len(b).3 min readfunctools.lru_cache.2 min readdiff a2 min read