About 8,850,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 good for proto-typing a function and/or writing a base, but after you know the code works and you go back to it during the optimization phase, try to replace it with …

  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. recursion - Java recursive Fibonacci sequence - Stack Overflow

    In fibonacci sequence each item is the sum of the previous two. So, you wrote a recursive algorithm. So, fibonacci(5) = fibonacci(4) + fibonacci(3) fibonacci(3) = fibonacci(2) + …

  6. What is the difference between iteration and recursion?

    Feb 19, 2016 · 0 Recursion and iteration are different ways to think about a solution. It would be dificult to explain in depth the difference in full scope. In your sample code, you aleady showed …

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

  8. java - What is recursion - Stack Overflow

    Nov 30, 2012 · Recursion is a programming technique where a method can call itself as part of its calculation (sometimes you can have more than one method - the methods would then …

  9. performance - Recursion or Iteration? - Stack Overflow

    Jun 24, 2011 · Recursion is more simple (and thus - more fundamental) than any possible definition of an iteration. You can define a Turing-complete system with only a pair of …

  10. Recursion Limit in LangGraph agent - Stack Overflow

    Mar 17, 2025 · langgraph.errors.GraphRecursionError: Recursion limit of 25 reached without hitting a stop condition. You can increase the limit by setting the recursion_limit config key.