3 edited tags
2 added 31 characters in body

I'm analyzing a piece of code that has a recursive call inside a for loop such as:

def fun(n):
for i in range(0, 256):
if ( n > 0):
fun(n-8)


(I only included a general piece of code not the actual version)

It is my understanding that a recursive call gets assigned T(n) = T(n-8) but what happens when it is nested inside a for loop?

I'm analyzing a piece of code that has a recursive call inside a for loop such as:

def fun(n):
for i in range(0, 256):
fun(n-8)


(I only included a general piece of code not the actual version)

It is my understanding that a recursive call gets assigned T(n) = T(n-8) but what happens when it is nested inside a for loop?

I'm analyzing a piece of code that has a recursive call inside a for loop such as:

def fun(n):
for i in range(0, 256):
if ( n > 0):
fun(n-8)


(I only included a general piece of code not the actual version)

It is my understanding that a recursive call gets assigned T(n) = T(n-8) but what happens when it is nested inside a for loop?

1

# Recursion call inside a for loop time

I'm analyzing a piece of code that has a recursive call inside a for loop such as:

def fun(n):
for i in range(0, 256):
fun(n-8)


(I only included a general piece of code not the actual version)

It is my understanding that a recursive call gets assigned T(n) = T(n-8) but what happens when it is nested inside a for loop?