See what we can offer to your school
"SimpleStudy just makes sense...”
Get the best plan for your school
13 cards from this deck
Function calls itself to solve smaller instances of same problem
Condition that stops the recursion
Part of function that calls itself with smaller/simpler input
Stores current state of each call; unwinds when base case reached
Uses loops (FOR/WHILE) to repeat code until condition is met
Recursion uses more memory due to call stack
Iteration is generally faster & more efficient
Can occur in recursion if base case is missing
Can occur in iteration if loop condition is incorrect
Simplifies code for complex problems; more elegant & clear
More efficient; uses less memory; avoids stack overflow
Each recursive call uses stack memory; can cause stack overflow
Track variable values at each step to debug & understand behaviour
Select your subjects, and get access to A+ resources today.