A substring is a block of consecutive characters. Return the length of the longest substring that appears in both a and b.
For a = "abcdxyz" and b = "xyzabcd" the answer is 4 ("abcd").
Example 1
Input:
longest_common_substring('abcdxyz', 'xyzabcd')
Output:
4
Example 2
Input:
longest_common_substring('zxabcdezy', 'yzabcdezx')
Output:
6
0 <= len(a), len(b) <= 900No results yet
Run your code to check it against the examples, or submit to run every test.