what is tail recursion?
What is tail recursion?
Hii @manavmalhotra2020
A recursive function is tail recursive when recursive call is the last thing executed by the function.For eg in the video of print decreasing in the code the last statement is pd(n-1). So the compiler will save time by eliminating the calls of pd(5), pd(4), pd(3) pd(2) directly to optimise things because for every call no work is done after the call.
Hey Manav, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.