Loading practice questions
What is the basic formula applied in Rabin-Karp Algorithm to achieve pre-processing in Theta(m)?
Correct Answer: B — Horner's rule
Explanation:
Horner's rule is used to evaluate the pattern in Theta(m): p = P[m] + 10(P[m-1] + 10(P[m-2] + ... + 10(P[2] + 10P[1])...)).