kmp algorithm an example