Question: choose the right answer please. 1. Is there any input for which KMP algorithm performs asymptotically worse than the finite automaton string-matching algorithm? TRUE FALSE
choose the right answer please.
1.
Is there any input for which KMP algorithm performs asymptotically worse than the finite automaton string-matching algorithm?
TRUE
FALSE
2.
What is the worst-case scenario for KMP algorithm in terms of the equation s' = s + (q-k) ?
Assume the usual notations for s, s', q, and k.
a. P: abababab
b. P: hgfedcba
c. P: aaaaaaaa
d. P: abcdefgh
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
