Mental Model
Find the longest sequence of characters that appears exactly the same and continuously in both strings.
Analogy: Imagine two friends comparing their favorite songs to find the longest exact part of the melody they both like without breaks.
String1: a b c d e f g String2: x y c d e z We look for the longest continuous matching part: c d e