Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Golf: Tree searching

by japhy (Canon)
on Apr 19, 2001 at 22:17 UTC ( #73917=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub f{($s,$t)=@_;while($t->{d}ne$s){$t=$t->{(r,l)[$s lt$t->{d}]}||retu
    +rn}$t}
    
  2. or download this
    sub f{($^,*_)=@_;*_=$_{(r,l)[$^lt$_{d}]}||return while$_{d}ne$^;*_}
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-08-28 09:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (335 votes), past polls