Week 1 Flashcards
1
Q
What is tail recursion
A
A form of linear recursion where the recursive step is applied last
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