added knuth-morris-pratt string search algorithm