recursion Flashcards
1
Q
recursion
A
when a method calls itself
2
Q
recursion method call argument
A
change the argument passed into the function with every call and work towards the base case
3
Q
base case
A
when the function does not call itself, ends the recursion
4
Q
recursion stack frames
A
continues to add stack frames until the base case is reached, then it works back down the stack
5
Q
what is recursion good for?
A
> breaking problems down into smaller instances
allows repetition
process data structures that show similar structures on a smaller scale