LongestCommonSubsequence
LongestCommonSubsequence[s1,s2]
finds the longest contiguous subsequence of elements common to the strings, biomolecular sequences or lists s1 and s2.
Details and Options
- If there are several common subsequences of the same length, LongestCommonSubsequence returns the one that appears earliest in s1.
- 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 s1.
Examples
open allclose allBasic Examples (3)
Wolfram Research (2008), LongestCommonSubsequence, Wolfram Language function, https://reference.wolfram.com/language/ref/LongestCommonSubsequence.html (updated 2020).
Text
Wolfram Research (2008), LongestCommonSubsequence, Wolfram Language function, https://reference.wolfram.com/language/ref/LongestCommonSubsequence.html (updated 2020).
CMS
Wolfram Language. 2008. "LongestCommonSubsequence." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/LongestCommonSubsequence.html.
APA
Wolfram Language. (2008). LongestCommonSubsequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LongestCommonSubsequence.html