Vidyalelo
Data Structure · Q22

String Matching

Programming · Data Structure · question 22

Q22

What does the failure function in the Knuth-Morris-Pratt (KMP) algorithm help with?

A.
Preprocessing the text.
B.
Sorting the pattern.
C.
Determining the next position to match after a mismatch.
Answer
D.
Hashing the pattern.

Answer: Option C

Solution

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