[Tutor] Algorithm for sequence matching

Walter Prins wprins at gmail.com
Sat Jul 2 23:16:16 CEST 2011


Hi Ankur,

On 2 July 2011 21:30, ANKUR AGGARWAL <coolankur2006 at gmail.com> wrote:

> Hey
> I am looking for an algo for the largest sequence search in the two list.
>
> Example : list a accepts some say 'm' numbers. list b accept says 'n'
> numbers. I want to look for the largest same sequence between the two list
> and then display it. I tried out but failed to do so.
> Say A=[11,23,45,21,63,56,78,32]
> B=[56,78,11,23,45,21,111,234,56543]
>
> There are two  similar sequence matching over here [11,23] and [23,45,21] i
> want to display second sequence because its larger in number. Plz help
> Thanks in Advance :)
>

Umm, what about [11,23,45,21]?  That seems to be longer still so should be
the best one to display, or?

Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110702/6e73461a/attachment.html>


More information about the Tutor mailing list