1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. Rabin Karp algorithm and naive pattern s...
Q.

Rabin Karp algorithm and naive pattern searching algorithm have the same worst case time complexity.

A. true
B. false
Answer» A. true
Explanation: the worst case time complexity of rabin karp algorithm is o(m*n) but it has a linear average case time complexity. so rabin karp and naive pattern searching algorithm have the same worst case time complexity.

Discussion