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: Option D

Join The Discussion