Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Longest String Matching

by space_monk (Chaplain)
on Apr 08, 2013 at 12:08 UTC ( #1027481=note: print w/replies, xml ) Need Help??


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

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.

Replies are listed 'Best First'.
Re^4: Longest String Matching
by hdb (Monsignor) on Apr 08, 2013 at 12:17 UTC

    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://1027481]
help
Chatterbox?
[Eily]: hello perlmonks :)
[Corion]: choroba: I think it's great that your kids (have to) perform in public - that makes you appreciate any kind of show much better IMO

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-12-12 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (327 votes). Check out past polls.

    Notices?