Skip to content

Commit f776628

Browse files
Merge pull request raviprakashdev#74 from sapan17/patch-2
Create Fibonacci Number.py
2 parents 88fe0eb + fc53f8b commit f776628

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Fibonacci Number.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution(object):
2+
def fib(self, N):
3+
"""
4+
:type N: int
5+
:rtype: int
6+
"""
7+
a,b = 0,1
8+
for i in range(N):
9+
a,b = b,b+a
10+
return a

0 commit comments

Comments
 (0)