Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Finding longest palindrome from a string

by BrowserUk (Pope)
on Aug 13, 2004 at 21:38 UTC ( #382854=note: print w/replies, xml ) Need Help??


in reply to Re^2: Finding longest palindrome from a string
in thread Finding longest palindrome from a string

Unfortunately, the benchmark doesn't tell the whole story. Many of the regex-based solutions fail on unescaped regex characters.

All of the faster ones fail to correctly find the longest string when fed either of:

1111111121111111111112111111111111111111111112111111111111211111 ababacababacadacababacadaeadacabaz

(Including mine, which is sad, as the first one is my publish test string:()


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://382854]
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: (5)
As of 2016-09-26 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (476 votes). Check out past polls.