Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: Finding largest common subset in lists?

by broquaint (Abbot)
on Jun 05, 2003 at 12:58 UTC ( [id://263304]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://263304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-24 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found