recursion Flashcards

1
Q

recursion

A

when a method calls itself

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

recursion method call argument

A

change the argument passed into the function with every call and work towards the base case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

base case

A

when the function does not call itself, ends the recursion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

recursion stack frames

A

continues to add stack frames until the base case is reached, then it works back down the stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly