recursion Flashcards

1
Q

what is recursion

A

whena subroutine calls itself during its execution

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

what are the advantages of recursion

A

fewer lines of code so less chance for mistakes

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

what is the disad of recursion

A

a function or subroutine calling itself too many times could lead to the call stack running out of memoery aka stack overflow

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