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

Re: Is there a way to compare strings without using an array?

by MidLifeXis (Monsignor)
on Oct 18, 2011 at 19:01 UTC ( #932219=note: print w/ replies, xml ) Need Help??


in reply to Is there a way to compare strings without using an array?

I need a little bit of clarification. Is this a correct interpretation of your question?

  • given two strings
  • find all duplicate characters
  • order of matches is not important

This also looks homeworkish. If so, please state as much. In any case, please show what you have tried.

--MidLifeXis


Comment on Re: Is there a way to compare strings without using an array?
Replies are listed 'Best First'.
Re^2: Is there a way to compare strings without using an array?
by Jeri (Scribe) on Oct 18, 2011 at 19:39 UTC

    Yes, that is correct and no it isn't a hw problem. I have individual protein families, each containing a various number of proteins. These proteins are not unique to a protein family. They can be in many families. I'm trying to find the best way to perform total protein coverage with the least number of protein families. I'm using a greedy algorithm. Instead of storing all 5million (rough guess) or so proteins in an array and checking them off once I've retrieved them I would like to put them in a really long string to save some space. I haven't tried using a string yet, because I've been working with a hash array combination.

      In which case, have you looked at BioPerl yet? It might have more tools that you'll be interested in. There's a large community at www.bioperl.org

      perl -e 'print qq(Just another Perl Hacker\n)' # where's the irony switch?

        I will do just that today!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2015-07-31 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls