Next:
Up:
Previous:
Analysis
The Rabin-Karp algorithm takes
time in the worst case.
O(n) + O(m(v + n/q)) average case, v = #valid shifts
If q
m and v = O(1), then O(n+m).
Next:
Up:
Previous: