Mental Model
Find the longest starting part that all strings share. We compare characters one by one until a difference appears.
Analogy: Imagine several friends starting a race together. The longest common prefix is like the longest stretch of road where all friends run side by side before someone takes a different path.
Strings: [flower] [flow] [flight] Longest Common Prefix: [f l] ā ā
