約 16,400,000 件の結果
リンクを新しいタブで開く
  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

    2009年3月19日 · 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. algorithm - recursion versus iteration - Stack Overflow

    2013年3月28日 · Is it correct to say that everywhere recursion is used a for loop could be used? And if recursion is usually slower what is the technical reason for ever using it over for loop …

  4. performance - Recursion or Iteration? - Stack Overflow

    2011年6月24日 · Recursion has a disadvantage that the algorithm that you write using recursion has O (n) space complexity. While iterative aproach have a space complexity of O (1).This is …

  5. What are the advantages and disadvantages of recursion?

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

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

  7. recursion - Python recursive Pascal's triangle - Stack Overflow

    After completing an assignment to create Pascal's triangle using an iterative function, I have attempted to recreate it using a recursive function. I have gotten to the point where I can get it to

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

    2015年5月13日 · 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 …

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

    2008年8月29日 · 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 …

  10. Convert recursion to iteration - Stack Overflow

    Well, in general, recursion can be mimicked as iteration by simply using a storage variable. Note that recursion and iteration are generally equivalent; one can almost always be converted to the …