Knuth Morris Pratt Algorithm Example