Maximum Common Substring
Start Timer
0:00:00
Given two strings, write a function max_common_substring
that finds the longest common substring between the input strings.
A substring is a contiguous sequence of characters within a string. If there is no common substring, your function should return an empty string.
Example:
Input:
string1 = "Python"
string2 = "Phython"
Output:
max_common_substring(string1, string2) -> "ython"
Recommended questions for you
Personalized based on your user activity, skill level, and preferences.
.
.
.
.
.
.
.
.
.
Comments