About 3,140,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 …

  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 …

  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 …

  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 …

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

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

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

  8. Can every recursion be converted into iteration? - Stack Overflow

    May 31, 2009 · 1 Recursion is nothing just calling the same function on the stack and once function dies out it is removed from the stack. So one can always use an explicit stack to …

  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 …

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