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

Re^2: Longest String Matching

by hdb (Parson)
on Apr 08, 2013 at 12:02 UTC ( #1027479=note: print w/ replies, xml ) Need Help??


in reply to Re: Longest String Matching
in thread Longest String Matching

I do not think it can get much better. My proposal is not very useful for large dictionaries...


Comment on Re^2: Longest String Matching
Re^3: Longest String Matching
by space_monk (Chaplain) on Apr 08, 2013 at 12:08 UTC
    Thanks; Maybe my solution is better than I first thought! :-)
    A Monk aims to give answers to those who have none, and to learn from those who know more.

      Adding the empty string to the lexikon allows the following shortening:

      $lookup{''} = 1; substr($word, 0, 1) = "" while !exists $lookup{$word};

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2014-08-28 14:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (263 votes), past polls