Examveda

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

A. By sorting the text.

B. By using the failure function.

C. By using a sliding window.

D. By sorting the text.

Answer: Option B


This Question Belongs to Data Structure >> String Matching

Join The Discussion

Related Questions on String Matching