rabin karp and kmp string pattern