|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
LongestCommonSubsequence
LongestCommonSubsequence[s1, s2]
finds the longest contiguous subsequence of elements common to the strings or lists
and
.
Details and OptionsDetails and Options
- If there are several common subsequences of the same length, LongestCommonSubsequence returns the one that appears earliest in
. - For strings, setting the option IgnoreCase->True makes LongestCommonSubsequence treat lowercase and uppercase letters as equivalent, and return the form of common subsequence that occurs in
.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Find the longest contiguous subsequence common to two strings:
| In[1]:= |
| Out[1]= |
New in 7
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
