约 50 个结果
在新选项卡中打开链接
  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 built from …

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

  4. What is the maximum recursion depth, and how to increase it?

    Return the current value of the recursion limit, the maximum depth of the Python interpreter stack. This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python.

  5. How exactly does recursion work in x86 assembly?

    2025年10月26日 · My question is focused specifically on assembly (intel). In C for example, recursion can be done with a simple return command but in assembly I feel like there's a lot more things going …

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

  7. algorithm - recursion versus iteration - Stack Overflow

    2020年2月23日 · Recursion is usually much slower because all function calls must be stored in a stack to allow the return back to the caller functions. In many cases, memory has to be allocated and …

  8. python - How to solve GRAPH_RECURSION_LIMIT error in langgraph …

    2025年9月15日 · 2 You’re hitting GRAPH_RECURSION_LIMIT because your graph keeps looping on the same node without waiting for user input. Solution: Use interrupt() in the node where you ask for …

  9. Real-world examples of recursion - Stack Overflow

    2008年9月20日 · There is no recursion in the real-world. Recursion is a mathematical abstraction. You can model lots of things using recursion. In that sense, Fibonacci is absolutely real-world, as there …

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

    2008年8月29日 · 59 Tail recursion refers to the recursive call being last in the last logic instruction in the recursive algorithm. Typically in recursion, you have a base-case which is what stops the recursive …