Initial version of Knuth-Morris-Pratt algorith for string pattern
matching