About 50 results
Open links in new tab
  1. What is recursion and when should I use it? - Stack Overflow

    There are a number of good explanations of recursion in this thread, this answer is about why you shouldn't use it in most languages.* In the majority of major imperative language implementations …

  2. Difference between recursion and iteration - Stack Overflow

    Jan 2, 2021 · We can distinguish (as is done in SICP) recursive and iterative procedures from recursive and iterative processes. The former are as your definition describes, where recursion is basically the …

  3. algorithm - What is tail recursion? - Stack Overflow

    Aug 29, 2008 · Tail recursion optimization is to remove call stack for the tail recursion call, and instead do a jump, like in a while loop. But if you do use the return value of a recursive call before return it, it …

  4. oop - What is open recursion? - Stack Overflow

    May 22, 2011 · Open recursion is the ability for one method body to invoke another method of the same object (mutually recursive definitions, that's why recursive) and allowing a method defined in one …

  5. The difference between head & tail recursion - Stack Overflow

    Jan 29, 2014 · The definition I was told is the following: Tail Recursion: A call is tail-recursive if nothing has to be done after the call returns i.e. when the call returns, the returned value is immediately …

  6. What is the Definition of Recursion - Stack Overflow

    Jul 17, 2013 · Recursion in computer programming is exemplified when a function is defined in terms of simpler, often smaller versions of itself. The solution to the problem is then devised by combining the …

  7. list - Basics of recursion in Python - Stack Overflow

    May 13, 2015 · Tail Call Recursion Once you understand how the above recursion works, you can try to make it a little bit better. Now, to find the actual result, we are depending on the value of the previous …

  8. What are the advantages and disadvantages of recursion?

    Mar 9, 2011 · With respect to using recursion over non-recursive methods in sorting algorithms or, for that matter, any algorithm what are its pros and cons?

  9. recursion - Top down vs bottom up recursive data definition? - Stack ...

    These are a mathematical dual to induction and recursion and provide an entirely different way of thinking about how to define a data structure. In particular, they allow for infinitely large data …

  10. Basic Recursion, Check Balanced Parenthesis - Stack Overflow

    Apr 26, 2010 · I've written software in the past that uses a stack to check for balanced equations, but now I'm asked to write a similar algorithm recursively to check for properly nested brackets and …