What is the name of a non-retail recursion?

Asked

Viewed 47 times

4

In tail recursion, the recursive call is the last thing the function does, and can be optimized.

And when is it not tail? What is the name? "Common"? "Body"? There must be a specific name for it!

  • 1

    The most commonly used terms are: recursāo, common recursion and traditional recursion, in contrast to the tail recursion.

  • Take a look at the answer: https://answall.com/questions/184494/o-que%C3%A9-a-recurs%C3%A3o-de-cauda

1 answer

2

To tail recursion is a recursion technique that makes less use of memory during the stacking, which makes it faster than common recursion.

In a common recursion, every recursive call made, it is necessary to save the position of the code where the call was made to continue from there as soon as the result is received.

Reference:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.