A longest common subsequence of two finite sequences has maximum length among sequences that occur in both with their original order. Characters can be skipped; this differs from requiring a contiguous substring. For and , is a common subsequence of length four.
Articles by others on the same topic
Note that the subsequences do not need to be contiguous.
Implementations: