View on GitHub

CC

CC practice and cheat sheets

Recurrence Relation


There are two important things that one needs to figure out before implementing a recursive function:

Once we figure out the above two elements, to implement a recursive function we simply call the function itself according to the recurrence relation until we reach the base case.