What is the worst case running time in the searching phase of Boyer-Moore's algorithm?
O(n)
O(log n)
O(m+n)
O(mn)
(D) O(mn)
Explanation:
If the pattern occurs in the text, the worst case running time of Boyer-Moore's algorithm is O(mn).