WLJS LogoWLJS Notebook

LongestCommonSubsequence

LongestCommonSubsequence[s1, s2] finds the longest contiguous subsequence of elements common to the strings, biomolecular sequences or lists s1 and s2.

Examples

LongestCommonSubsequence["abcdefg", "cdefgh"]
(* "cdefg" *)

Please visit the official Wolfram Language Reference for more details.

On this page