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

    Recursion is a tree, with branches and leaves, called parents and children respectively. When you use a recursion algorithm, you more or less consciously are building a tree from the data.

  2. Recursion vs loops - Stack Overflow

    Mar 19, 2009 · Recursion is used to express an algorithm that is naturally recursive in a form that is more easily understandable. A "naturally recursive" algorithm is one where the answer is …

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

  4. 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?

  5. Understanding how recursive functions work - Stack Overflow

    Sep 5, 2014 · Recursion started making sense to me when I stopped reading what others say about it or seeing it as something I can avoid and just wrote code. I found a problem with a …

  6. Convert recursion to iteration - Stack Overflow

    37 Strive to make your recursive call Tail Recursion (recursion where the last statement is the recursive call). Once you have that, converting it to iteration is generally pretty easy.

  7. performance - Recursion or Iteration? - Stack Overflow

    Jun 24, 2011 · 18 Recursion is more costly in memory, as each recursive call generally requires a memory address to be pushed to the stack - so that later the program could return to that …

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

  9. Is recursion ever faster than looping? - Stack Overflow

    Why? Because recursion is typically well founded over some data structure, inducing an Initial F-algebra and allowing you to prove some properties about termination along with inductive …

  10. How to use recursion in creating a binary search algorithm

    However when coding something of this complexity I am confused on how to use it to my advantage. Therefore my question is how do I apply recursion when coding a binary search …