http://qs321.pair.com?node_id=656561


in reply to Can KMP be used to find the longest common subsequence?

Some background context:

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).