Question: Let the pattern be p = abc. Compare the number of comparisons in Boyer- Moore Algorithm and Knuth-Morris-Pratt Algorithm if a) the string is aabcbcbabcabcabc;
Let the pattern be p = abc. Compare the number of comparisons in Boyer- Moore Algorithm and Knuth-Morris-Pratt Algorithm if a) the string is aabcbcbabcabcabc; b) the string is abababababababab. Explain your answer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
