Boyer-Moore-Horspool (BMH) (Single String Search String Search)

From Algorithm Wiki
Jump to navigation Jump to search

Time Complexity

$O(mn + s)$

Space Complexity

$O(s)$ words

(Derived: Uses a bad-character shift table of size $O(s)$)

Description

Bad-character heuristic

Approximate?

Exact

Randomized?

No, deterministic

Model of Computation

Word RAM

Year

1980

Reference

https://onlinelibrary.wiley.com/doi/abs/10.1002/spe.4380100608