A subsequence keeps the order of the characters but may skip some. Return the length of the longest string that is a subsequence of both a and b.
For a = "abcde" and b = "ace" the answer is 3 ("ace").
The starter code is a plain recursion. It is correct but too slow for long strings.
Example 1
Input:
lcs_length('abcde', 'ace')
Output:
3
Example 2
Input:
lcs_length('abc', 'def')
Output:
0
0 <= len(a), len(b) <= 900No results yet
Run your code to check it against the examples, or submit to run every test.