Single String Search

Single string search algorithms try to find a place where a string (also called a pattern) is found within a larger string or text.

Parameters

  • mm: pattern length
  • nn: length of searchable text
  • ss: size of the alphabet

Filters

Computational Model

Randomization

Approximation

Algorithms Table

Displaying 14 of 14 algorithms

See more
Fast Hybrid Algorithm2017O(n+m+s)O(n+m+s)O(m)O(m)
Quick-Skip Searching2012O(mn)O(mn)O(m)O(m)
BOM (Backward Oracle Matching)1999O(mn)O(mn)O(m)O(m)
Tuned Boyer-Moore algorithm1991O(mn)O(mn)O(m+s)O(m + s)
Two-way String-Matching Algorithm1991O(n+m)O(n + m)O(1)O(1)
Raita Algorithm1991O(mn+s)O(mn + s)O(s)O(s)
Rabin-Karp (RK) algorithm1987O(mn)O(mn)O(1)O(1)
Apostolico–Giancarlo Algorithm1986O(m+s+n)O(m + s + n)O(m)O(m)
Boyer-Moore-Horspool (BMH)1980O(mn+s)O(mn + s)O(s)O(s)
Knuth-Morris-Pratt (KMP) algorithm1977O(m+n)O(m+n)O(m)O(m)
Boyer-Moore (BM) algorithm1977O(mn+s)O(mn + s)O(s)O(s)
Bitap algorithm1964O(mn)O(mn)O(m)O(m)
Naïve string-search algorithm1940O(m(nm+1))O(m(n-m+1))O(1)O(1)
String-Matching with Finite Automata1940O(mn)O(mn)O(m)O(m)

Reductions Table

Insuffient Data to display table

Other relevant algorithms

Insuffient Data to display table