Vidyalelo
Data Structure · Q35

String Matching

Programming · Data Structure · question 35

Q35

How does the Knuth-Morris-Pratt (KMP) algorithm handle mismatches efficiently?

A.
By sorting the text.
B.
By using the failure function.
Answer
C.
By using a sliding window.
D.
By sorting the text.

Answer: Option B

Solution

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