Pseudo Code: -
for i := 0 to (lenStr - patLen), do
for j := 0 to patLen, do
if text[i+j] ≠ pattern[j], then
break the loop
done
if j == patLen, then
display the position i, as pattern found
Pseudo Code: -
for i := 0 to (lenStr - patLen), do
for j := 0 to patLen, do
if text[i+j] ≠ pattern[j], then
break the loop
done
if j == patLen, then
display the position i, as pattern found