Vidyalelo
Data Structure · Q58

String Matching

Programming · Data Structure · question 58

Q58

If the expected number of valid shifts is small and modulus is larger than the length of pattern what is the matching time of Rabin Karp Algorithm?

A.
Theta(m)
B.
Big-Oh(n+m)
Answer
C.
Theta(n-m)
D.
Big-Oh(n)

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board