MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Finding shared element in two lists


On Nov 23, 2:58 am, Jason Ebaugh <ebaughja... at gmail.com> wrote:
> I figured out my original question this morning.
> The answer is about as "functional" as one can get!
>
> Use the built in function LongestCommonSequence[]

I think you want LongestCommonSubsequence. From the documentation:

LongestCommonSequence[    "AAABBBBCCCCC", "CCCBBBAAABABA"]
LongestCommonSubsequence[ "AAABBBBCCCCC", "CCCBBBAAABABA"]

AAABB
AAAB


  • Prev by Date: Anyone get OpenCL working?
  • Next by Date: Re: Importing data
  • Previous by thread: Re: Finding shared element in two lists
  • Next by thread: Re: Finding shared element in two lists