Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 avoiding work at the Monastery: (6)
As of 2014-08-22 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls