Week 1 Flashcards

1
Q

What is tail recursion

A

A form of linear recursion where the recursive step is applied last

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

Why is tail recursion more efficient

A

Since the recursive step is applied last there are no following operations that we need to deal with

Since we only care about the final state(current state) all previous states can be disregarded

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