Vidyalelo
Data Structure · Q13

String Matching

Programming · Data Structure · question 13

Q13

In which situation does the Knuth-Morris-Pratt (KMP) algorithm perform particularly well?

A.
When the pattern is very short.
B.
When the text is randomly structured.
C.
When the text contains many repetitions.
D.
When the pattern is long and the text is large.
Answer

Answer: Option D

Solution

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