Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You are right, 'aabcc' and 'abbbc' scoring 5 is a mistake. A score of 5 for two 5 letter words means that they are a permutation of one another. For instance, 'abcde' and 'eacdb' should score 5.
Sorry for being vague about the requirements... They really are vague ! Maybe examples can help: aabcc, abbbc -> 3 (once a, once b and once c, that's it) stress, super -> 3 (once s, e and r) abcde, caebd -> 5 (permutation) abcde, caebdxxy -> 5 (doesn't change things) In reply to Re: Re: Re: Optimizing a string processing sub
by spurperl
|
|