Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View amiiy's full-sized avatar
💭
I may be slow to respond.

Amir amiiy

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am amiiy on github.
  • I am amiy (https://keybase.io/amiy) on keybase.
  • I have a public key ASDU2KbBqcNjL25KXjWJppDx7LECWAXwg6_Rn08oyo0PLwo

To claim this, I am signing this object:

@amiiy
amiiy / fibonacci.py
Created January 26, 2017 19:51
fibonacci in dynamic programing way
#fibonacci series with dynamic programing Approach !
#better way ...
def fib(n):
l = [1,1]
if n == 0 :
return 1
elif n == 1 :
return 1
elif n == 2 :
@amiiy
amiiy / fibonacci.py
Created January 26, 2017 19:38
fibonacci series with recursive approach
# recursive fibonacci series
# to mush overhead & duplicated calculation's
# let it gooo !
def fib(x):
if x == 1 or x == 2 :
return 1
else:
return fib(x-1) + fib(x - 2 )