Element 'knuth-morris-pratt algorithm'