in reply to Re: Fibonacci Numbers
in thread Fibonacci Numbers
If you stick with the original form of your answer (a recurrance-based one), try Memoizing it, viz.:But the original form of his answer was not recursive:
sub fib{ ($val0, $val1) =@_; $sum= $val0 + $val1; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Fibonacci Numbers
by dReKurCe (Scribe) on Feb 10, 2005 at 22:56 UTC | |
by lidden (Curate) on Feb 10, 2005 at 23:33 UTC | |
by blazar (Canon) on Feb 11, 2005 at 09:39 UTC |