Fibonacci Number

Other topics

Naive Recursive Implementation

Fibonacci numbers are used as a very common example for teaching recursion.

fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)

Contributors

Topic Id: 8585

Example Ids: 26849

This site is not affiliated with any of the contributors.