3 ms·
What pathological case are you referring to? The worst case I can think of is a completely random haystack in which case it is approximately equivalent to a nai
by TheCoelacanth 8y ago
What pathological case are you referring to? The worst case I can think of is a completely random haystack in which case it is approximately equivalent to a naive search.
Even Boyer-Moore is not superior to a naive search in literally every case, e.g. short needle or large alphabet.