Loading practice questions
What is the worst case time complexity of KMP algorithm for pattern searching (m = length of text, n = length of pattern)?
Correct Answer: C — O(m)
Explanation:
KMP algorithm is an efficient pattern searching algorithm. It has a time complexity of O(m) where m is the length of text.