String Matching Algorithms

Write summaries of KMP Algorithm, Boyer-Moore string-search algorithm, Rabin-Karp Algorithm

Problem Statement

Given a search string N='ABCDEFGHIJKLMNOPQRSTUVWXYZ' and a pattern M='DEF' , we want to see if the pattern M can be found in the string N.

Naive Approach

The Naive implementation of the search algorithm will compare the pattern M against all possible substrings of that length in the search string N.