Examveda

What is the worst case time complexity of KMP algorithm for pattern searching (m = length of text, n = length of pattern)?

A. O(n)

B. O(n*m)

C. O(m)

D. O(log n)

Answer: Option C


This Question Belongs to Data Structure >> Searching Algorithms

Join The Discussion

Related Questions on Searching Algorithms