Maximal Substring
Start Timer
0:00:00
Given two strings, string1 and string2, write a function max_substring to return the maximal substring shared by both strings.
Example:
Input:
string1 = 'mississippi'
string2 = 'mossyistheapple'
Output:
def maximal_substring(string1, string2) -> 'mssispp'
Note: If there are multiple max substrings with the same length just return any one of them.
.
.
.
.
.
.
.
.
.
Comments