Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://73936]
help
Chatterbox?
[marto]: Corion crazy busy at the moment, with work (and a tpue), the kids and some external factors
[marto]: hopefully everything is good with you
[Corion]: marto: Yes, everything is still as crazy here, but I'm somewhat more calm about it - the one week in the sun certainly helped ;)
[marto]: Corion where did you go?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2017-02-24 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (353 votes). Check out past polls.