Skip to content

Commit db43efd

Browse files
Added Fibonacci Description (#658)
Added the basic description of Fibonacci Numbers and the main aim of the functions.
1 parent cf62ede commit db43efd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

algorithms/dp/fib.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
'''
2+
In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequence, called the Fibonacci sequence,
3+
such that each number is the sum of the two preceding ones, starting from 0 and 1.
4+
That is,
5+
F0=0 , F1=1
6+
and
7+
Fn= F(n-1) + F(n-2)
8+
The Fibonacci numbers are the numbers in the following integer sequence.
9+
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …….
10+
11+
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation
12+
13+
Here, given a number n, print n-th Fibonacci Number.
14+
'''
115
def fib_recursive(n):
216
"""[summary]
317
Computes the n-th fibonacci number recursive.

0 commit comments

Comments
 (0)