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

Re^4: Golf: Tree searching

by tadman (Prior)
on Apr 20, 2001 at 06:12 UTC ( #74051=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub f{for(($s,$t)=@_;$_=$$t{(0,l,r)[$$t{d}cmp$s]};$t=$_){}$t}
  2. or download this
    sub f{for(($s,$t)=@_;$_=$t&&(0,l,r)[$$t{d}cmp$s];){$t=$$t{$_}||0}$t}
  3. or download this
    sub f{for(($s,$t)=@_;$_=$t&&(0,l,r)[$$t{d}cmp$s];){$t=$$t{$_}}$t}
  4. or download this
        $|++;
        $table = {
            d => 'h',
    ...
                print "Answer for $y = ";
                print $x," ", $$x{d},"\n";
        }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-09-02 05:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (20 votes), past polls