Re: FIbonacci
- From: Jordan Abel <jmabel@xxxxxxxxxx>
- Date: Wed, 14 Dec 2005 03:10:16 +0000 (UTC)
On 2005-12-11, Peteris Krumins <peteris.krumins@xxxxxxxxx> wrote:
> Eric Sosman wrote:
>> Peteris Krumins wrote:
>>
>>
>> Somebody always proposes this solution, but it's a
>> poor one. Try it with fib(47), say, and tell us how
>> long it takes. Hint: You won't need a high-precision
>> timer.
>>
>
> Yes, the solution has exponential complexity.
But only needs the last two results [or even the last one even and the
last one odd n] cached to reduce it to the same as the iterative
version.
.
- References:
- FIbonacci
- From: MARQUITOS51
- Re: FIbonacci
- From: Peteris Krumins
- Re: FIbonacci
- From: Eric Sosman
- Re: FIbonacci
- From: Peteris Krumins
- FIbonacci
- Prev by Date: Re: OT, Google boilerplate (was: Re: initializing array using pointer)
- Next by Date: Re: how to make link betwenn flaoting point to printf statement?
- Previous by thread: Re: FIbonacci
- Next by thread: Re: FIbonacci
- Index(es):
Relevant Pages
|