Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: finding longest common substring

by duff (Parson)
on Nov 19, 2003 at 22:12 UTC ( #308424=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub repeated_substring {
       my ($ssl,$pos) = (1,-1);
    ...
       }
       return $pos == -1 ? "" : substr($_[0], $pos, $ssl-1);
    }
    
  2. or download this
    sub findlcs {
       my @ret;
    ...
       }
       return (sort { length($a) <=> length($b) } @ret)[0];
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2020-11-24 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?