-TierI Interview Prep > Strings > Flashcards
Name of O(n) algo for simple pattern matching a string of length n
KMP (Knuth Morris Pratt)
Rabin Karp time complexity
average and best-case running time of the Rabin-Karp algorithm is O(n+m), but its worst-case time is O(nm).