Previous Lecture Lecture 7 Next Lecture

Lecture 7, Tue 04/23

Recursion and Algorithm Analysis

Plan for Today

Midterm Preparation

Recursion and Call Stack

def triple(num):
  return num + double(num)

def double(num):
  return 2 * num

print(triple(5))

Time Complexity

for x in range(n, 0, -1):
  x = x * x

Student Questions