An Elementary Algorithm for Pattern Matching

Nidhi Bansal · 2018

A string matching algorithm aims to find one or several occurrences of a string within another. String matching is a classical problem in computer science. Our approach presents an elementary and efficient algorithm. First, we find some index values of pattern of length m from text T, the algorithm returns the position of the first character of the desired substring in the text. In second phase it matches whether the substring at this index value matches the actual pattern P. The algorithm works in linear time, if the number of occurrences of the pattern in a string is very less.

Read the paper · More papers on PaperTik