About 2,750,000 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. What is the difference between iteration and recursion?

    Feb 19, 2016 · 4 The main difference between recursion and iteration is memory usage. For every recursive call needs space on the stack frame resulting in memory overhead. Let me give you an …

  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. 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 …

  5. recursion - Determining complexity for recursive functions (Big O ...

    Nov 20, 2012 · I have a Computer Science Midterm tomorrow and I need help determining the complexity of these recursive functions. I know how to solve simple cases, but I am still trying to …

  6. 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 …

  7. Convert recursion to iteration - Stack Overflow

    In recursion the computer maintains a stack and in iterative version you will have to manually maintain the stack. Think over it, just convert a depth first search (on graphs) recursive program into a dfs …

  8. 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 …

  9. 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 …

  10. 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 …