It employs a Brute Force technique to identify the presence of a pattern in the given text.
It is not efficient algorithm because it takes the time complexity of the algorithm to check for a substring is O((m-n)n) where m is the length of the text and n is the length of the pattern (substring) to be searched.
There is no preprocessing is required for this algorithm, unlike KMP algorithm.
Preprocessing time: 0 (no preprocessing)
Matching time: O((n-m)m).