Vidyalelo
Data Structure · Q8

String Matching

Programming · Data Structure · question 8

Q8

What is the space complexity of the Knuth-Morris-Pratt (KMP) algorithm?

A.
O(n)
B.
O(m + n)
C.
O(m)
Answer
D.
O(m*n)

Answer: Option C

Solution

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