Vidyalelo
Data Structure · Q78

Searching Algorithms

Programming · Data Structure · question 78

Q78

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)
Answer
D.
O(log n)

Answer: Option C

Solution

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