Given two strings, find the length of the longest substring that is common to both.
{ "s1": "AGGTAB", "s2": "GXTXAYB" }
1
{ "s1": "ABCDGH", "s2": "ACDGHR" }
4
{ "s1": "zxabcdezy", "s2": "yzabcdezx" }
6
Sign in to Run Code and Submit