Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Golf: Tree searching

by indigo (Scribe)
on Apr 19, 2001 at 23:03 UTC ( #73936=note: print w/ replies, xml ) Need Help??


in reply to Golf: Tree searching

sub f{my($s,$t)=@_;$t?$$t{d}eq$s?$t:f($s,$$t{l})||f($s,$$t{r}):0}
61 chars. Passes -w and use strict.

Hint: You don't have to take advantage of the binary search property...


Comment on Re: Golf: Tree searching
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2014-04-24 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (565 votes), past polls