7 kyu
Recursion #2 - Fibonacci
3,135gabrielsiedler
Description:
Do you know recursion?
This is a kata series that you can only solve using recursion.
##2 - Fibonacci number
In mathematical terms, the sequence f(n)
of fibonacci numbers is defined by the recurrence relation
f(n) = f(n-1) + f(n-2)
with seed values
f(1) = 1
and f(2) = 1
#Your task
You have to create the function fibonacci
that receives n
and returns f(n)
. You have to use recursion.
Fundamentals
Recursion
Mathematics
Similar Kata:
Stats:
Created | Jan 12, 2016 |
Published | Jan 12, 2016 |
Warriors Trained | 4380 |
Total Skips | 84 |
Total Code Submissions | 7031 |
Total Times Completed | 3135 |
JavaScript Completions | 3135 |
Total Stars | 50 |
% of votes with a positive feedback rating | 92% of 466 |
Total "Very Satisfied" Votes | 401 |
Total "Somewhat Satisfied" Votes | 57 |
Total "Not Satisfied" Votes | 8 |