TG Telegram Group & Channel
Python Codes | United States America (US)
Create: Update:

Time complexity in above Picture

Fibonacci Number using Recursion


CODE
:

def fib(n):
if n <= 0: # base case 1
return 0
if n <= 1: # base case 2
return 1
else: # recursive step
return fib(n-1) + fib(n-2)

Share and Support
@Python_Codes

Time complexity in above Picture

Fibonacci Number using Recursion


CODE
:

def fib(n):
if n <= 0: # base case 1
return 0
if n <= 1: # base case 2
return 1
else: # recursive step
return fib(n-1) + fib(n-2)

Share and Support
@Python_Codes


>>Click here to continue<<

Python Codes






Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)