Initial Pattern Matching Algorithm
- read the text and the pattern
- position <- 1
- repeat until position is too large
- if pattern occurs at position in text then
- write position
- position <- position + 1 (end until loop)
Here we have used a very high level pseudocode to outline our first pass at an algorithm.
Many details have purposefully been omitted.
The flexibility and power of expressing algorithms in pseudocode is emphasized.
Last Updated 01/05/2000
© L.Heath, 2000