in reply to Re: Challenge: Perl 5: lazy sameFringe()?
in thread Challenge: Perl 5: lazy sameFringe()?
my $a = [ 1, [ 2, [ 3, [ 4, 5 ] ] ] ]; my $d = [ 1, 2, 3, 4, 5 ]; print sameFringe( $a, $d )?"Same\n":"Different\n"; __END__ Use of uninitialized value in string ne ... Different
oops!!! I just realized that the task is restricted to binary trees! =)
(how boring ;)
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|