[일상의 한마디]

Fibonacci by Recursion....

조나단봉 2002. 10. 9. 00:32
Bad Algorithm...

The i_th Fibonacci number is the sum of two previous Fibonacci numbers.

initial value...
1_th value is 1
2_th value is 1
3_th value is 1_th + 2_th = 2

Implement by Recursion
n = 5
then call 5 4 3 2 1 0 1 2 1 0 3 2 1 0 1 th value...

if n = 10
then call 177 values... --;

if n = 100
So much time needed....
Not Finished yet... --;