ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the pre-processing time of the Rabin-Karp Algorithm?
Correct Answer: C — Theta(m)
The for loop in the pre-processing step runs m times (length of the pattern). Hence the pre-processing time is Theta(m).