in reply to Re: Re: Finding largest common subset in lists?
in thread Finding largest common subset in lists?

The output is due to the fact that 'b' is repeated in @b so the offset in %map is for the second 'b'. I think I'll leave the code as it is for the time being and just add a caveat that it won't work when there are duplicates in @b. Thanks once again :)

_________
broquaint

  • Comment on Re: Re: Re: Finding largest common subset in lists?

Replies are listed 'Best First'.
Re: Re: Re: Re: Finding largest common subset in lists?
by zby (Vicar) on Jun 05, 2003 at 13:20 UTC
    It was aimed at duplicates, but I did not take into account the details - just the general algorithm. I believe you can not do it in one sweep when there are duplicates.