81 chars. Shorter than Masem, but longer than jcwren. However, something's wrong with it that I can't quite pinpoint. Can anyone figure out why this doesn't work?sub z{my($s,$t)=@_;return if!$t;(z($s,$t->{r},$t,z($s,$t->{l}))[$s cmp + $t->{d}]}
In reply to Re: Golf: Tree searching
by premchai21
in thread Golf: Tree searching
by Masem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |