Brute Force algorithm
lastmod 2020-10-23created 2014-09-162 edits
The simplest way to find a pattern P of length m in a text T of length n (it checks, one by one, whether the pattern P starts at each position in T).
Starting at T[0], it compares with each character of P; when a mismatched character is found, the next comparison starts at T[1] and compares with each character of P, and this process repeats.