About 4,470,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 implementations …

  2. Determining complexity for recursive functions (Big O notation)

    Nov 20, 2012 · This function is log (n) base 5, for every time we divide by 5 before calling the function so its O(log(n)) (base 5), often called logarithmic and most often Big O notation and complexity analysis …

  3. Can a lambda function call itself recursively in Python?

    A regular function can contain a call to itself in its definition, no problem. I can't figure out how to do it with a lambda function though for the simple reason that the lambda function has no n...

  4. Recursive Function palindrome in Python - Stack Overflow

    I need help writing a recursive function which detects whether a string is a palindrome. But i can't use any loops it must be recursive. Can anyone help show me how this is done . Im using Python.

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

    Aug 29, 2008 · A function is tail recursive if each recursive case consists only of a call to the function itself, possibly with different arguments. Or, tail recursion is recursion with no pending work.

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

  7. python - Flattening a list recursively - Stack Overflow

    Sep 18, 2012 · I am trying to flatten lists recursively in Python. I have this code: def flatten (test_list): #define base case to exit recursive method if len (test_list) == 0: return [] elif

  8. function - Powershell Recursion with Return - Stack Overflow

    Feb 14, 2011 · 7 I am trying to write a recursive function that will return information in an array, however when I put a return statement into the function it misses certain entries. I am trying to recursively look …

  9. recursion - Java recursive Fibonacci sequence - Stack Overflow

    By using an internal ConcurrentHashMap which theoretically might allow this recursive implementation to properly operate in a multithreaded environment, I have implemented a fib function that uses both …

  10. What is the difference between iteration and recursion?

    Feb 19, 2016 · 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 an …