in reply to Longest repeated string...
Yzzyx,
First, you are going to want to google for 'longest common substring' as your brute force approach is definately not the right way to go.
First, you are going to want to google for 'longest common substring' as your brute force approach is definately not the right way to go.
Second, the idiom you don't understand deserves to be in the "Perl Idioms Explained" category. In a nutshell, Perl will do what you mean (DWYM) when you give it proper context. A list in scalar context returns the number of items in the list.
Third - good luck. No matter what algorithm you use (LCS) and what language you use (C/Assembler), this is not going to be a fast answer.Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Longest repeated string...
by japhy (Canon) on Feb 03, 2006 at 17:37 UTC | |
by Limbic~Region (Chancellor) on Feb 03, 2006 at 17:42 UTC | |
by japhy (Canon) on Feb 03, 2006 at 17:45 UTC | |
by Limbic~Region (Chancellor) on Feb 03, 2006 at 17:48 UTC |
In Section
Seekers of Perl Wisdom