Concept Flow - String Pattern Matching Naive
Start at text index i=0
Compare pattern with text from i
Match all pattern chars?
Yes→Pattern found at i
No
Increment i by 1
Check if i <= text length - pattern length
Yes
End search
↩Back to Compare
Start from the beginning of the text and check if the pattern matches at each position until the end is reached.
