Recursion Flashcards

1
Q

Define recursion from a programmer point of view

A

a function that calls itself

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

One of the purposes of the run time stack is to store data values for an executing program. List two of the different types of program values that are stored.

A

Local variables, parameters, and return values

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

Iterative coding solutions incorporate a _______ programming structure while recursive coding solutions incorporate a _______ programming structure.

A

looping and if/else

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

the _____ is the portion of code where a recursive solution can terminate its recursive process

A

anchor point or base case

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

recursive solutions typically take longer to process in code. why?

A

overhead from repeating function calls

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

_______ the stack refers to the stack “growing” and ______ the stack refers to the stack “shrinking”

A

winding and unwinding

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