Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagar Paul committed Jun 6, 2021
1 parent bc1ec41 commit 0b5e202
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
14 changes: 0 additions & 14 deletions LeetCode/03_.py

This file was deleted.

28 changes: 28 additions & 0 deletions LeetCode/Recursive and Iterative for Fibonacci series.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Recursive fuction

def feb(n):
if n<=1:
return n
return feb(n-1) + feb(n-2)

k = int(input(f"k = "))

for i in range(k):
print(feb(i))



# Iterativr method for Fibonacci

a = 0
b = 1
n = int(input())
print(a)
print(b)
for i in range(n-2):
c = a+b
a,b = b,c
print(c)



Empty file added LeetCode/__.py
Empty file.

0 comments on commit 0b5e202

Please sign in to comment.