Boyer-Moore (BM) algorithm (Single String Search String Search)

From Algorithm Wiki
Jump to navigation Jump to search

Time Complexity

$O(mn + s)$

Space Complexity

$O(s)$ words

(https://www.cs.utexas.edu/users/moore/publications/fstrpos.pdf)

Description

Heuristics-based, bad-character and good-suffix heuristics

Approximate?

Exact

Randomized?

No, deterministic

Model of Computation

Word RAM

Year

1977

Reference

https://www.cs.utexas.edu/users/moore/publications/fstrpos.pdf