in reply to Re: Re (tilly) 1: Ackerman vs. Perl : KO in 3 rounds
in thread Ackerman vs. Perl : KO in 3 rounds
Impressed?sub A { my ($x, $y) = @_; my @stack = (); while (1) { if (0 == $x) { if (@stack) { $y++; $x = pop(@stack); } else { return 1 + $y; } } else { if (0 == $y) { $x--; $y = 1; } else { push @stack, $x-1; $y--; } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 3 (faster): Ackerman vs. Perl : KO in 3 rounds
by John M. Dlugosz (Monsignor) on Dec 19, 2001 at 22:10 UTC | |
by tilly (Archbishop) on Dec 19, 2001 at 23:07 UTC |