Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Finding longest palindrome from a string

by BrowserUk (Patriarch)
on Aug 13, 2004 at 21:38 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://382854]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found