Content deleted Content added
→Single-pattern algorithms: two-way has space complexity log(m). Saying "O(1) because string lengths are bounded in practice" makes O(.) notation useless. |
→Naive string search: 's -> is |
||
Line 42:
== Examples of search algorithms ==
=== Naive string search ===
A simple and inefficient way to see where one string occurs inside another is to check at each index, one by one. First, we see if there
=== Finite-state-automaton-based search ===
|