Skip to content

Instantly share code, notes, and snippets.

🎯
Solving problems with my craft

Raheem Azeez Abiodun raheemazeezabiodun

🎯
Solving problems with my craft
Block or report user

Report or block raheemazeezabiodun

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raheemazeezabiodun
raheemazeezabiodun / gcd.py
Created Jul 23, 2019
Computing greatest common divisor
View gcd.py
def slow_gcd(arg1,arg2):
gcd = 0
for num in range(1, arg1 + arg2+ 1):
if (arg1 % num == 0) and (arg2 %num == 0):
gcd = num
return gcd
def fast_gcd(arg1,arg2):
if arg2 == 0:
@raheemazeezabiodun
raheemazeezabiodun / fibonacci.py
Created Jul 22, 2019
A fibonacci sequence with a better approach
View fibonacci.py
def slow_fibonacci_number(n):
if n <= 1:
return n
return slow_fibonacci_number(n - 1) + slow_fibonacci_number(n - 2)
def fast_fibonacci_number(n):
numbers = [0, 1]
for num in range(2, n+1):
numbers.append(numbers[num - 1] + numbers[num - 2])
You can’t perform that action at this time.