Content deleted Content added
m →Shifting substrings search and competing algorithms: def pattern |
|||
Line 4:
== Shifting substrings search and competing algorithms ==
The basic problem the algorithm addresses is finding a fixed substring of length ''m'', called the ''pattern'', within a text of length ''n''; for example, finding the string "sun" in the sentence "Hello sunshine in this vale of tears." The simplest conceivable algorithm for this task just looks for the substring at all possible positions:
{{wikicode}}
|