Math 2.0

Computer science Algorithms as mathematical objects Concept

String-searching algorithm

Summary

A string-searching algorithm, or string-matching algorithm, finds the places where a short string, the pattern, occurs inside a longer string, the text. The obvious method compares the pattern at every position and needs time O(nm)O(nm) for a text of length nn and a pattern of length mm. Cleverer methods, such as the Knuth–Morris–Pratt algorithm, reach time O(n+m)O(n + m) by reusing what earlier comparisons revealed. These algorithms underlie text editors, search tools and the analysis of DNA sequences.

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/String-searching_algorithm
About this page
TagTQ3YZDGCHM
URIm2://TQ3YZDGCHM
Kindconcept
WritingW0 stub
MSC68W32, 68R15, 68W40
SpecializesAlgorithm
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Special cases

Definitions

Used by