Posts

Showing posts with the label String matching

Naive String Matching Algorithm

Image
Hi, this is Shubham Mishra. I write blogs on algorithms and new technologies. In today's blog, we will be going to see a traditional way for string matching. For this blog, I have taken the reference of Analysis of Algorithm by A.A.Putambekar's book. String matching generally used in text processing. Normally text processing is done in the compilation of a program. The string matching is a vital part in software designing and system designing. String matching means finding one or more generally all the occurrences of a string in a text. These occurrences are called Pattern . Let, Text T is denoted by T0.....T(n-1) and pattern P is denoted by P0....P(m-1). String Matching Algorithm For String matching scenario we will be discussing many algorithms in upcoming blogs such as, The naive method (This blog) Rabin-Karp algorithm Finite automaton for string matching Knuth - Morris - Pratt method Naive String Matching Algorithm Naiv...