Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
One way to look at it is to find one sentence as a concatenation of a prefix and suffix from the other sentence.
Get the longest common prefix between them and the longest common suffix.