I am trying to find a way to get the code to determine the longest length of sequences in common between two sequences.
Example:
So if we had sequence A: 12343241234132142
and sequence B: 231232412431
. The answer would be 32412
, hence 5 elements in common, if I am not mistaken. Sequence A and B would have different sizes, but one of the sequences would always be the same (sequence A would always have 100 elements).
Previous Research:
I have looked at various ways of doing this: longest common substring, sequence matcher, etc. However, it only gave me the ratio of similarity, which is not informative, as I want to know the number of consecutive sequence elements that are common between sequences.