Re: [Tutor] Algorithm for sequence matching

2011-07-03 Thread Albert-Jan Roskam
: [Tutor] Algorithm for sequence matching To: "Walter Prins" Cc: tutor@python.org Date: Sunday, July 3, 2011, 5:48 PM I know a way to do thatset1 = set(list1)set2 = set(list2)combined = set1&set2 On Sat, Jul 2, 2011 at 5:16 PM, Walter Prins wrote: Hi Ankur, On 2 July 2011 21:30,

Re: [Tutor] Algorithm for sequence matching

2011-07-03 Thread Christopher King
I know a way to do that set1 = set(list1) set2 = set(list2) combined = set1&set2 On Sat, Jul 2, 2011 at 5:16 PM, Walter Prins wrote: > Hi Ankur, > > On 2 July 2011 21:30, ANKUR AGGARWAL wrote: > >> Hey >> I am looking for an algo for the largest sequence search in the two list. >> >> Example :

Re: [Tutor] Algorithm for sequence matching

2011-07-02 Thread Steven D'Aprano
ANKUR AGGARWAL 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 s

Re: [Tutor] Algorithm for sequence matching

2011-07-02 Thread Walter Prins
Just to clarify further: On 2 July 2011 23:46, Walter Prins wrote: > On 2 July 2011 21:30, ANKUR AGGARWAL wrote: > >> 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 tri

Re: [Tutor] Algorithm for sequence matching

2011-07-02 Thread Walter Prins
Hi Ankur, On 2 July 2011 21:30, ANKUR AGGARWAL 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 the

Re: [Tutor] Algorithm for sequence matching

2011-07-02 Thread Peter Otten
ANKUR AGGARWAL 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 fai

Re: [Tutor] Algorithm for sequence matching

2011-07-02 Thread Walter Prins
Forwarding back to list. -- Forwarded message -- From: ANKUR AGGARWAL Date: 2 July 2011 22:23 Subject: Re: [Tutor] Algorithm for sequence matching To: Walter Prins ya sorry I forgot to include 11 . i want the answer to be [11,23,45,21] On Sun, Jul 3, 2011 at 2:46 AM, Walter

Re: [Tutor] Algorithm for sequence matching

2011-07-02 Thread Walter Prins
Hi Ankur, On 2 July 2011 21:30, ANKUR AGGARWAL 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 the

Re: [Tutor] Algorithm for sequence matching

2011-07-02 Thread bob gailer
On 7/2/2011 4:30 PM, ANKUR AGGARWAL 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

[Tutor] Algorithm for sequence matching

2011-07-02 Thread ANKUR AGGARWAL
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