Your question is Longest Common Substring. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given two strings s1 and s2, return the longest common substring shared by both strings. A substring must be contiguous in each string. If multiple answers have the same maximum length, return the one that appears first in s1.
Write a function that takes two strings and returns a string.
s1, s2, two lowercase or mixed-case ASCII stringss1 and s2def longest_common_substring(s1, s2):