Wikipedia has an explanation of the Knuth-Morris-Pratt algorithm for substring searches.
The difference between a substring and a subsequence is that a subsequence is not necessarily contiguous (all the characters must be present, and in the correct order, but there can be unrelated characters in between).
In reply to Re: Can KMP be used to find the longest common subsequence?
by Thilosophy
in thread Can KMP be used to find the longest common subsequence?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |