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

15.
What is the primary benefit of using the Rabin-Karp algorithm?

16.
What is the preprocessing phase in the Knuth-Morris-Pratt (KMP) algorithm used for?

18.
How does the Rabin-Karp algorithm handle collisions in hashing?

19.
In the Boyer-Moore algorithm, what is the purpose of the bad character rule?