BoyerMooreGalil() may be less efficient than BoyerMoore() because for patterns with no periods it checks the condition in an if statement in each iteration of the outer while loop. Change the algorithm so that a driver function preprocesses the pattern to check for a period, and if a period is found, it calls BoyerMoore(); otherwise, it calls BoyerMooreGalil() without the if statement.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.